Palestinian fighters have launched several rockets into southern Israel after Israeli aircraft hit targets in the Gaza Strip.
Wednesday's incidents were the heaviest exchange of fire between the sides since they agreed to an internationally brokered ceasefire last November.
There were no casualties reported, but the violence threatened to shatter the calm that has prevailed for more than four months.
Israel's new defence minister has warned his country will not sit back if Palestinian fighters continue their attacks.
"We will not allow shooting of any sort [even sporadic] toward our citizens and our forces," Moshe Yaalon said in a statement.
He blamed the Palestinian faction Hamas - in control of Gaza since 2007 - for the rockets but the group has not claimed responsibility for the attacks.
Israel launched an offensive against Hamas last November in response to an increase in rocket fire out of Gaza.
During eight days of fighting, Israel carried out hundreds of air strikes in Gaza, while Gaza fighters fired hundreds of rockets into Israel.
More than 160 Palestinians, including dozens of civilians, and six Israelis were killed in the fighting before Egypt brokered a truce.
In recent weeks, there have been a handful of rocket attacks, including one that took place as President Barack Obama was visiting Israel two weeks ago.
Empty fields struck
Overnight on Wednesday, Israel responded for the first time by striking a pair of empty fields in northern and eastern Gaza.
But just around the time Yaalon was speaking on Wednesday morning, two more rockets exploded in the Israeli border town of Sderot, according to police.
Air raid sirens sounded throughout the town, forcing people on their way to work and school to take cover. No injuries were reported.
The Israeli military said a total of five rockets had been fired in the past 24 hours, including two that exploded prematurely inside Gaza.
Under the ceasefire, Israel pledged to halt its policy of attacking Palestinian leaders and to ease a blockade it has imposed on Gaza since the Hamas takeover in 2007. Hamas pledged to halt rocket attacks on Israel.
A number of smaller groups also operate in Gaza, including groups that draw inspiration from al-Qaeda.
Robert Serry, the UN Middle East envoy, appealed for calm in a statement, saying he is "worried" tensions could threaten the informal truce.
"It is of paramount importance to refrain from violence in this tense atmosphere and for parties to work constructively in addressing the underlying issues," he said.
Ihab Ghussein, Hamas government spokesman, accused Israel of using the air strikes to "divert the attention" from unrest in Israeli prisons.
"They think that through escalation on Gaza front they can hide the truth," he said, and urged Egypt, the guarantor of the ceasefire, to intervene.
Palestinian prisoners have been rioting and hunger striking since a 64-year-old prisoner died of throat cancer on Tuesday.