Tens of thousands of displaced Palestinians in Gaza began returning to their homes on Friday to inspect the devastation from 11 days of Israeli airstrikes in its war with Hamas, as both sides contemplated the fallout from the latest conflict.

The UN agency for Palestinian refugees, UNWRA, said most of the 66,000 Palestinians who had sought refuge in its schools during the fighting were heading home, as it began assessing the huge scale of the damage.

As families sought to retrieve possessions from damaged and collapsed buildings, civil defence teams pulled 10 survivors and five bodies from the rubble of the densely populated Palestinian enclave, taking the death toll to 243, including scores of Hamas fighters and 66 children, with more than 1,900 wounded.

On the Israeli side, a week and a half of rocket, mortar and anti-tank missile fire by Hamas and other militant groups killed one soldier as well as 12 civilians. Hundreds more Israelis were treated for injuries after rocket salvoes that caused panic and sent people rushing into shelters as far away as Tel Aviv.

But even as world leaders hailed a ceasefire that took hold in the early hours of Friday morning and vowed to help rebuild, many of the tensions that led to the fourth war in Gaza in almost 13 years remained starkly in evidence even as Washington stepped up its diplomatic efforts.

The US secretary of state, Antony Blinken, planned to visit the region in the coming days “to discuss recovery efforts and working together to build better futures for Israelis and Palestinians”, his department said.

But in comments made just hours after the ceasefire came into effect, Israel’s prime minister, Benjamin Netanyahu, warned Israel would respond forcefully in the event of any attack on Israel, as Hamas’s political leader, Ismail Haniyeh, said the fight against Israel would continue until the Al-Aqsa Mosque in East Jerusalem was “liberated.”

“If Hamas thinks that we will tolerate a trickle of rockets, it is mistaken,” said Netanyahu. “We will respond with a different kind of force to any firing on Gaza border commutes. What was is not what will be.”

The Israeli leader, who has faced domestic criticism from hawks for ending the offensive too soon, added that Israel had done “daring and new things” and caused “maximum damage to Hamas with a minimum of casualties in Israel”.

Haniyeh was equally belligerent. “Israel’s defeat in the Gaza war will have major consequences for its future,” he said.

In a further warning of the dangerous frictions ahead, Israeli police once again clashed with stone-throwing protesters around the Al-Aqsa mosque in Jerusalem’s Old City, barely two weeks after similar events led to the violent escalation between both sides.

Police fired stun grenades and teargas, and Palestinians hurled rocks and at least one firebomb, after hundreds took part in a celebratory demonstration in which they waved Palestinian and Hamas flags and cheered the militant group.

The trading of threats came as the UN secretary general urged Israel and Gaza’s Hamas rulers to observe the ceasefire, and called on global leaders to develop a reconstruction package “that supports the Palestinian people and strengthens their institutions”.

Antonio Guterres also said after Thursday’s announcement of an end to 11 days of clashes: “Israeli and Palestinian leaders have a responsibility beyond the restoration of calm to start a serious dialogue to address the root causes of the conflict.”

Few analysts believe, however, there will be progress towards resolving the fundamental issues in the immediate future. There were no signals of an end to Israel’s decades-old military grip over the Palestinian territories and its blockade on the already-devastated Gaza enclave, within which 2 million people live under hardline Hamas rule.

Welcoming the ceasefire in a televised address from the White House, however, the US president, Joe Biden, sounded a more optimistic tone, vowing to continue what he called “our quiet and relentless diplomacy” towards a long-term settlement, adding: “I believe we have a genuine opportunity to make progress.”

Biden has been criticised around the world and in his own party for refusing to agree to a joint UN security council call for a ceasefire, and for his failure to directly criticise Israel for the heavy civilian casualties from its bombardment of Gaza in response to Hamas rockets.

Reuters and Agence France-Presse contributed to this report