A ceasefire announced by Hamas largely held Sunday after the most severe exchange of fire between Israel and Palestinian militants in the Gaza Strip since a 2014 war, easing fears of a wider conflict for now.
Hamas, the Islamist movement that runs the blockaded Gaza Strip, said late Saturday a ceasefire had been reached with the help of Egypt and others, though Israel declined to comment.
The United Nations' Middle East envoy Nickolay Mladenov was in Gaza and "working with all concerned parties to de-escalate the situation," a UN official said on condition of anonymity.
In a press conference, he called on "everybody to step back from the brink".
Despite a few lower-level exchanges of fire, relative calm returned to the Gaza Strip.
In one incident on Sunday, an Israeli aircraft fired at what it said was militants launching balloons carrying firebombs over the Gaza border fence. It was not clear if there were casualties.
Saturday saw dozens of Israeli air strikes, killing two Palestinians, while some 200 rockets and mortars were fired from the enclave at Israel.
Four Israelis were wounded when a rocket hit a house in the city of Sderot near the Gaza Strip, authorities said.
The two Palestinians killed were aged 15 and 16, caught in an Israeli strike on a building in Gaza City, the enclave's health ministry said.
Twenty-five people were wounded across Gaza, it said.
- 'The hardest blow' -
Hamas said it fired at Israel in defence in response to air strikes, which came after a soldier was wounded by a grenade along the Gaza border.
Hamas leader Ismail Haniya said Sunday at the funeral for the two teenagers that the movement would challenge Israel with border protests until the blockade is lifted.
"This blood will not be shed for nothing," he told hundreds of mourners. "The enemy will not escape the punishment of the heroic resistance."
The mother of Amir al-Namra, the 15-year-old killed, said: "He just went out for walk. What did he and his friend do for them to be killed?"
Israel blamed Hamas for the escalation, pointing to months of protests and clashes along the border that its military argues the Islamist movement is seeking to use as cover for attacks.
There have also been hundreds of fires at Israeli farms caused by kites and balloons carrying firebombs from Gaza, leading to political pressure on the government and military to take action against Hamas.
Israeli Prime Minister Benjamin Netanyahu said Hamas had been hit with "the hardest blow" since a 2014 war.
He said Israel would not accept a ceasefire "that would allow the continuation of terrorism by incendiary kites and balloons".
"We are not prepared to accept any attacks against us and we will respond appropriately," he said.
Thick plumes of smoke had risen over parts of the Gaza Strip on Saturday as Israel hit dozens of targets it said belonged to militants, including a five-storey unoccupied building allegedly used by Hamas as a training facility with a tunnel underneath.
The army said the strikes targeted Hamas military facilities, including a battalion headquarters, training facilities and weapons storage areas.
In Israel, air raid sirens on Saturday sent people rushing to shelters in areas surrounding the Gaza Strip as rockets and mortars were fired from the Palestinian enclave at nearby communities.
Israel said its air defences intercepted around 30 of the some 200 rockets and mortars fired.
- Months of tension -
Tensions have been building between Hamas and Israel for months over protests and clashes along the border fence. The two sides have already fought three wars since 2008.
Since the protests and clashes broke out along the border on March 30, at least 141 Palestinians have been killed by Israeli fire.
The majority of those killed were involved in protests and clashes but others were seeking to breach or damage the border fence.
No Israelis have been killed.
The arson balloons and kites from Gaza have caused 750 fires and burned 2,600 hectares, leading to hundreds of thousands of dollars in damage, according to Israel's fire service.
On July 9, Israel closed its only goods crossing with the Gaza Strip in response to the fires.
Hamas called the move a "crime against humanity," with Gaza already suffering from deep poverty and worsening humanitarian conditions.
Border protests peaked on May 14, when the United States moved its Israel embassy to the disputed city of Jerusalem, but have continued at a lower level since.
On Friday, Israeli troops shot and killed two Palestinians, including a teenager, and wounded hundreds of others in border clashes.
An Israeli soldier was moderately wounded when a grenade was thrown at him from the northern Gaza Strip, the military said.
Israel says its use of live fire is necessary to defend its borders and stop infiltrations. Palestinians and rights groups say unarmed protesters are being shot while posing no real threat.
Palestinian youths walk through the wreckage of a building in Gaza City on July 15, 2018, the day after it was hit by Israeli air strikes
A Palestinian woman walks through rubble in the damaged Arts and Crafts Village in Gaza City on July 15, 2018, after the building next door was hit by Israeli air strikes the day before
Young residents of the southern Israeli city of Sderot walk in front of a fence damaged by a rocket reportedly fired from the Gaza Strip on July 14, 2018