Israel and Hamas both claimed victory on Friday after their forces ended 11 days of fighting, but humanitarian officials warned that the damage to Gaza would take years to rebuild.
After working behind the scenes for days to reach a truce, the White House said Washington had received assurances from the relevant parties that they were committed to the ceasefire.
As Palestinians and Israelis began to assess the scale of the damage, one Gazan said his neighbourhood looked as if it had been hit by a tsunami. "How can the world call itself civilised?" Abu Ali asked, standing next to the rubble of a 14-storey tower block.
Palestinian officials put the reconstruction costs at tens of millions of dollars, while economists said the fighting could curb Israel's economic recovery from the Covid-19 pandemic.
Five more bodies were pulled from Gaza's rubble, taking the death toll to 248, including 66 children, with more than 1,900 wounded.
The Israeli military said an Israeli soldier had been killed as well as 12 civilians, including two children. Hundreds were treated for injuries after rocket salvoes caused panic and sent people as far away as Tel Aviv rushing into shelters.
World Health Organization spokeswoman Margaret Harris said Gaza's health facilities were in danger of being overwhelmed by the thousands of injuries.
She called for immediate access into the Gaza Strip for health supplies and personnel. "The real challenges are the closures," she told a virtual UN briefing.
Gaza has for years been subjected to an Israeli blockade that restricts the passage of people and goods, as well as restrictions by Egypt.
Both countries cite concerns about weapons reaching Hamas, the Islamist group that controls Gaza and led the rocket barrage. Palestinians say the restrictions amount to collective punishment of Gaza's 2 million population.
Fabrizio Carboni, regional director of the International Committee of the Red Cross, echoed WHO's call for urgent medical supplies, adding: "It will take years to rebuild - and even more to rebuild the fractured lives."
US President Joe Biden said on Thursday that aid would be sent quickly to Gaza, but coordinated with the Palestinian Authority - Hamas's Western-backed rival in the occupied West Bank - "in a manner that does not permit Hamas to simply restock its military arsenal".
Israeli Prime Minister Benjamin Netanyahu made a televised address to Israelis, saying the operation had damaged Hamas's ability to launch missiles at Israel.
He said Israel had destroyed Hamas's extensive tunnel network, its rocket factories, weapons laboratories and storage facilities, and killed more than 200 militants, including 25 senior figures.
"Hamas can't hide anymore. That's a great achievement for Israel," he said.
"We eliminated an important part of Hamas's and Islamic Jihad's command echelon. And whoever was not killed knows today that our long arm can reach him anywhere, above ground or underground."
Israel said Hamas, Islamic Jihad and other militant groups fired around 4,350 rockets from Gaza during the conflict, of which around 640 fell short into the Gaza Strip. The Israeli military said that 90% of those that crossed the border had been intercepted by the Iron Dome missile defence system.
Iran, which does not recognise Israel but supports Hamas and says it has transformed the Palestinian fighters' arsenal, said they had won a "historic victory" over Israel. The Iranian Revolutionary Guards warned Israel to expect "deadly blows".
Hamas chief Ismail Haniyeh cast the fighting as successful resistance to a militarily and economically stronger foe.
"We will rebuild what the occupation (Israel) destroyed and restore our capabilities," he said, "and we will not abandon our obligations and duties to the families of martyrs, the wounded and those whose homes were destroyed."
Haniyeh expressed gratitude to Egyptian, Qatari and UN mediators, and to Iran, "which has not given up on providing the resistance with money, weapons and technology".
Iranian Supreme Leader Ayatollah Ali Khamenei urged Muslim states in a statement to "support the Palestinian people, through military ... or financial support ... or in rebuilding Gaza's infrastructure".
Ezzat el-Reshiq, a senior member of the Hamas political bureau, told Reuters in Doha the movement's demands included protection for the Al-Aqsa mosque, and for Palestinians threatened with eviction from their homes in East Jerusalem.
The Israel-Hamas hostilities were set off on May 10 in part by Israeli police raids on the Al-Aqsa compound and clashes with Palestinians during the Muslim holy month of Ramadan.
Thousands gathered there again for this Friday's prayers, with many demonstrating in support of Gaza.
Israeli police fired stun grenades towards demonstrators, who threw rocks and petrol bombs at officers, and Palestinian medics said some 20 Palestinians were wounded.
The confrontations died down within about an hour, with Israeli police pulling back to the compound's gates.
Civilians on both sides of the Gaza border were sceptical about the chances for peace.
"What is truce? What does it mean?" said Samira Abdallah Naseer, a mother of 11 children sitting near the wreckage of a building near Beit Hanoun in the north of the Gaza Strip.
"We returned to our houses, and we found no place to sit, no water, no electricity, no mattresses, nothing," she said.
In a cafe in the Israeli port city of Ashdod, north of Gaza, student Dan Kiri, 25, said Israel should continue attacking Hamas until it collapsed.
"It's only a matter of time until the next operation in Gaza," he said.
The truce, mediated by Egypt, appeared to be part of a two-stage deal, with Cairo sending security delegations to Tel Aviv and the Palestinian territories to agree on measures to maintain stability.
White House spokesman Jen Psaki said that "our engagement with the leader of Egypt was a key part of that discussion and a key part of bringing an end to the conflict, given their important relationship with Hamas". Biden on Thursday made his first call to Egyptian President Abdel Fattah al-Sisi as president.
The biggest obstacle to securing a deal was concern from Israel and Hamas about the public reactions from their own side, and their opponents, if they accepted a ceasefire, two Egyptian security sources said.
"In our negotiations with the two parties, we depended on the need for each of them to see the scale of the damage done to civilians, and we charged each party with its criminal and international liabilities towards civilians," one of the sources said.