Five Palestinians have been killed and more than 20 injured in a series of clashes close to the border between Israel and the Gaza Strip.
Four died when Israel open fired after a missile attack on an army patrol jeep which injured four Israeli soldiers.
Hamas officials said the casualties were civilians at a funeral in the Shijaia neighbourhood near Gaza City.
In a later incident, Islamic Jihad said one of its members was killed by an Israeli air strike.
Israel said it launched the attack, late on Saturday evening, after more rockets were fired from Gaza.
"A short while ago, the IDF (Israel Defence Forces) targeted a rocket-launching squad in the northern Gaza Strip moments after it fired rockets towards southern Israel. A direct hit was confirmed," an Israeli military statement said.
"Over the past few hours, 25 rockets fired from the Gaza Strip hit southern Israel," the statement added.
It is the latest in a spate of violence between Israel and militants in Gaza.
A 13-year-old Palestinian boy was killed as militants clashed with Israeli soldiers in Gaza on Thursday.
Later, an Israeli soldier was hurt when a tunnel blew up near the Gaza border fence, the Israeli military said.
Earlier this week, three Israeli soldiers on patrol along the border fence were also wounded by a bomb explosion, the military said.
The tunnel was one of the biggest seen in recent years and could have been part of a plan to kidnap or kill soldiers, an Israeli army spokeswoman said.
Hamas's military wing, the Izz al-Din Qassam Brigades, said it caused the blast, in response to the killing of the boy.
Flare-ups in violence in and around Gaza are frequent, says the BBC's Jon Donnison in the West Bank city of Ramallah.
Periods of calm rarely last for long, our correspondent says.
A spokesman for the Hamas militants threatened to respond to Saturday's shelling.
"Targeting civilians is a dangerous escalation that cannot be tolerated. The resistance has the full right to respond to the Israeli crimes," Fawzi Barhoum said in a text message sent to reporters, the Associated Press news agency reports.
In its statement, the IDF said it had targeted several sites in the Gaza Strip in response to the attack on the patrol along the security fence.
"The IDF will not tolerate any attempt to harm Israeli civilians, and will operate against anyone who uses terror against the State of Israel," it said.
"The Hamas terror organisation is solely responsible for any terrorist activity emanating from the Gaza Strip," the statement added.