Hamas security sources said two rockets hit a training camp for its armed wing, the Ezzedine Al-Qassam Brigades, east of Gaza City in the Zeitoun neighbourhood, with no one there at the time.
Hamas, the Palestinian Islamist movement, rules the Gaza Strip.
Shots were fired at Israeli military vehicles near the Gaza border on Friday and Sunday, causing bullet holes to their windows and leading to Monday's response, Israel's army said. No injuries were reported from the shooting incidents.