Six rockets were launched from Gaza at dawn, five of which were intercepted, the military said. Shortly afterwards, Israeli warplanes hit what it identified as two Hamas militant sites.
No-one is reported to have been hurt.
The exchange follows an Israeli raid in Nablus in the occupied West Bank on Wednesday which killed 11 Palestinians.
Both Hamas, which controls Gaza, and another militant group, Palestinian Islamic Jihad, had issued threats of retaliation.
UN Middle East envoy Tor Wennesland, who has been involved in mediation efforts to try to stop an escalation along with Egyptian officials, travelled to Gaza on Thursday to meet leaders of Hamas.
“I am deeply disturbed by the continuing cycle of violence and appalled by the loss of civilian lives,” he said before the trip. “I urge all sides to refrain from steps that could further enflame an already volatile situation.”
No militant group has so far said it was behind Thursday’s rocket launches, which caused sirens to sound in southern Israeli cities and towns near Gaza, including Ashkelon and Sderot.
There were small explosions in the sky as most were intercepted by Israel’s Iron Dome defence system, according to the Israeli military. One rocket fell in an open area.
The military said two hours later that its fighter jets struck a weapons manufacturing site and a military compound belonging to Hamas in central and northern Gaza in response.
Video footage posted online reportedly showed explosions in the al-Bureij and al-Shati refugee camps.
Following the exchange of fire, Israeli Prime Minister Benjamin Netanyahu told a cabinet meeting: “We will continue to take strong action on all fronts, near and far, in order to thwart our enemies’ efforts to attack us. Whoever tries to harm us will pay the price.”
On Wednesday morning, Israeli forces entered the busy old city of Nablus, in the northern West Bank, for what they said was an operation to arrest three wanted Palestinian militants. However, they were quickly caught up in a gun battle with armed fighters.
Israeli troops eventually fired shoulder-launched missiles at a house in which the three militants were holed up, having said that they would not surrender. The Israeli military said the men were involved in the killing of an Israeli soldier last year and were planning imminent attacks.
Several civilians were also among those killed in the raid, including three elderly men.
A video also showed young men, apparently unarmed, running away as gunshots are heard before one falls to the ground. The Israeli military said it was reviewing the footage.
Local hospitals have been struggling to treat dozens of people who were injured, many with bullet wounds.
One doctor told the BBC’s Tom Bateman that this was one of the worst events of this kind that he had seen in recent years.
A 15-year-old boy with a wound to the leg said he had been standing near militants when he was hit by Israeli gunfire.
A senior Palestinian official called it a “massacre”, while Hamas said its patience was “running out” and Palestinian Islamic Jihad said it had a “duty” to respond.
Israel has intensified its search-and-arrest raids in the West Bank over the past year, saying it is trying to stem the spate of deadly Palestinian attacks targeting Israelis.
So far this year, more than 60 Palestinians – militants and civilians – have been killed, while 10 Israelis and a Ukrainian have been killed in the same period.
The US, which has been trying to ease spiralling tensions, said on Wednesday that it was “extremely concerned by the levels of violence”.
News Source: BBC