GAZA CITY  -  A ceasefire announced by the Palestinian Islamist movement Hamas largely held Saturday after a wave of deadly air strikes across Gaza sparked by the death of an Israeli soldier shot near the border.

READ MORE: Going not-so green

The soldier's death was the first linked to Gaza violence since a 2014 war and raised fears that Israel's response could spiral into full-out war.

But the decision of Hamas, which rules the enclave, to accept a ceasefire and not further retaliate reduced those fears for now.

UN Secretary-General Antonio Guterres called Saturday on Israelis and Palestinians to avoid “another devastating conflict” after resurgent violence claimed five lives on Friday.

“I am gravely concerned over the dangerous escalation of violence in Gaza and southern Israel,” he said in a statement. “It is imperative that all sides urgently step back from the brink of another devastating conflict.”

The recent violence in Gaza marks the most serious escalation between Israel and Hamas since the 2014 war. “I call on Hamas and other Palestinian militants to cease the launching of rockets and incendiary kites and provocations” along the fence separating Israel from Gaza, Guterres said. “And Israel must exercise restraint to avoid further inflaming the situation.”

He encouraged all parties to work with the UN to find a peaceful solution to the crisis, saying that it endangered lives on both sides while aggravating the “humanitarian catastrophe” in Gaza.

As has been the case with previous such truces, Israel did not confirm the deal announced by Hamas that went into effect around midnight Friday. There was relative calm on Saturday except for one incident, with the Israeli army saying a tank struck a Hamas observation point east of Gaza City in retaliation for an attempted border infiltration in northern Gaza.

There were no reports of injuries in that strike and there was no major Israeli bombing campaign overnight or mortar fire from the Palestinian enclave towards Israel. "With Egyptian and UN efforts, we reached (an agreement) to return to the previous state of calm between the (Israeli) occupation and the Palestinian factions," Hamas spokesman Fawzi Barhoum said in a statement early Saturday.

A senior Hamas official, speaking on condition of anonymity, told AFP the deal involved "the cessation of all forms of military escalation" including Israeli air strikes and Hamas mortars and rockets.

The source said that balloons and kites attached with incendiary devices, which Palestinians have been floating over the border for months to spark fires inside Israel, were not included in the agreement.

There was however one reported fire in Israel near the Gaza border on Saturday, a fire department spokesman said, although its cause was not immediately clear. Israeli politicians have been calling for a fierce response to the kites and balloons, which have caused damage amounting to millions of shekels (hundreds of thousands of dollars).

Israel's army and Prime Minister Benjamin Netanyahu's office declined to confirm a truce was reached. On Friday, three Hamas militants were killed as air raids sent fireballs exploding into the sky over Gaza, while Israel said rockets had been fired back at its territory. A fourth Palestinian was shot dead in protests near the border.

The United Nations urged all sides to step "back from the brink" of war after months of increasing tensions.

The soldier, shot dead along the border in southern Gaza, was the first to be killed in and around the Palestinian enclave since a 2014 war between Israel and Hamas. Friday's flare-up is the latest as demonstrations and clashes on the frontier since March have seen at least 149 Palestinians killed.

In addition to the shooting attack, Israel's army said explosive devices and around seven hand grenades were used, while a number of rockets were launched.

The army said it struck 68 Hamas sites including weapon manufacturing sites, a drone warehouse and a military operations room. It came only a week after the most severe exchange of fire between Israel and Palestinian militants in Gaza since the 2014 war.

Jason Greenblatt, US President Donald Trump's Middle East peace envoy, laid the blame for weeks of increasing tensions solely on Hamas.

"Hamas works relentlessly to destroy Israeli lives (& Gazans suffer as a result of Hamas)," he tweeted, while offering condolences to the soldier's family.

- 'Temporary reprieve' -

Hamas and Israel have fought three wars since 2008.

Israel has tightened its already crippling blockade of Gaza in recent weeks as it seeks to pressure Hamas to end the incendiary kites and balloons.

Hugh Lovatt, Israel-Palestine fellow at the European Council on Foreign Relations think-tank, told AFP another round of conflict remained highly possible.

"The ceasefire is crucial and shows neither side wants war but it's only a temporary reprieve," he said.

"Unless it can be consolidated and translated into a more permanent agreement that includes an easing of Israeli restrictions then we will continue to witness ever more frequent flare ups."

Mustafa al-Sawaf, a political analyst close to Hamas, told AFP that the shooting was seen as a reaction to the killing of a number of Hamas fighters by Israeli strikes in recent days.

Hamas, he said, would consider its strategy "successful after this round of confrontation and escalation".