Israel bombed Hamas positions in Gaza overnight in retaliation for rocket fire across the border, which cut short an election rally by Prime Minister Benjamin Netanyahu, the military said Wednesday.
Netanyahu was hustled off stage when sirens warning of incoming rockets blared in the southern city of Ashdod late Tuesday, public television reported.
It came just hours after the premier pledged to annex the Jordan Valley in the occupied West Bank if re-elected.
Israeli fighter jets "hit 15 terrorist targets in the north and centre of the Gaza Strip," including a weapons factory, an attack tunnel and naval targets, the army said.
It said it would "continue to hold Hamas responsible for everything that comes from the Gaza Strip," regardless of who actually fired the weapons.
The Islamists of Hamas have been the de facto rulers of Gaza since they ousted forces loyal to president Mahmud Abbas in deadly fighting in 2007.
Both rockets fired from Gaza were shot down by Israel's Iron Dome air defence system.
Video posted on WhatsApp by Netanyahu's right-wing Likud party showed him returning to the stage after the all-clear and saying that Hamas was scared of him winning next Tuesday's general election.
"If it attacks us on live TV, you understand that it doesn't want us here," he told his audience.
Arch-foes Hamas and Israel have fought three wars since 2008.