Police said the rocket hit “between two buildings on a road” in Sderot, which is less than 4 kilometres from Gaza, causing no casualties.
Army spokesman Peter Lerner said Israeli forces retaliated by hitting Hamas targets in northern Gaza.
“In response to the rocket attack from the Gaza Strip, the IAF (Israeli air force) and tanks targeted two Hamas posts in the northern Gaza Strip,” Lerner said in a statement.
Palestinian health and security sources said two people were lightly wounded by the Israeli fire.
“One of them is a 20-year-old (young man) who was hit by shrapnel in the face,” said Ashraf al-Qudra, spokesman for the Palestinian health ministry in Gaza.
Security sources in the territory said several targets in northern Gaza were struck by Israeli fire, and that a reservoir in Beit Hanun was destroyed.
Witnesses said a base of Hamas’s military wing the Ezzedine Al-Qassam Brigades, in nearby Beit Lahya, was also hit.
Israeli media said it was the first time downtown Sderot had been hit by a rocket from Gaza since the last war with Palestinian militants in the territory in 2014.
On July 2, Israeli air raids hit four sites in Gaza after a rocket struck a building in Sderot. There were no casualties in either incident.