The ceasefire agreed between Israel and Hamas overnight appeared to have been upheld by both sides in the first 12 hours.

Eleven days of violence officially came to an end at 2am on Friday (12am UK time) after Egypt and the US helped broker a peace deal.

Israeli Prime Minister Benjamin Netanyahu announced it had accepted Egypt’s deal late on Thursday, but warned that “the reality on the ground will determine the future of the campaign”.

Hamas also confirmed it would agree, but rocket salvoes continued and Israel carried out at least one airstrike until the truce came into effect at 2am.

The fighting, which engulfed Israel, Gaza and the West Bank, was the worst seen in the region since 2014.

Most of the victims were Palestinian – at least 230, according to Gaza health officials – while 12 died in Israel.

UK Prime Minister Boris Johnson tweeted to welcome news of the ceasefire.

More on Gaza

He wrote: “Leaders in the region must now work to find a durable solution to the Israeli-Palestinian conflict that prevents terrorism, ends the cycle of violence and delivers a sustainable and just peace.”

Foreign Secretary Dominic Raab described it as “an important step to ending the cycle of violence and loss of civilian life”.

He added: “Hamas must end all attacks on Israel. It is also now important for Israel to facilitate rapid humanitarian access in and out of Gaza.”

Israel and Hamas both claimed victory as the ceasefire took hold.

As the ceasefire took effect, Palestinians left their homes and returned to the streets of Gaza. Some shouted “Allahu akbar”, while others whistled from their balconies.

Cars packed the roads, with drivers honking their horns and waving flags from the windows. Some men fired rifles into the air, while others set off firecrackers.

Mosque loudspeakers hailed what they described as “the victory of the resistance achieved over the occupation during the battle of the Sword of Jerusalem”.

One man clutching an AK-47 assault rifle told Reuters: “Our fingers are on the triggers, and we are ready to fight again, but now we will celebrate with our people.”

Spontaneous celebrations also broke out in east Jerusalem and across the occupied West Bank.

The ceasefire will face its first test this afternoon, when tens of thousands of Palestinians will attend Friday Prayers at the Al-Aqsa mosque in Jerusalem – where tensions first began.

A holy site for both Jews and Muslims, prayers at the mosque could be accompanied by protests or celebrations, which could spark tensions with police similar to the ones seen that led to the fighting.

The ceasefire came days after US President Joe Biden called for a “significant de-escalation” and followed mediation bids by Egypt, Qatar and the UN.

US Secretary of State Antony Blinken promised to visit the region in the coming days to “to discuss recovery efforts and working together to build better futures for Israelis and Palestinians,” according to the state department.

From the White House, Mr Biden sent his “sincere condolences to all the families, Israeli and Palestinian, who have lost loved ones” in the fighting.

Mr Biden said Israel’s Iron Dome defence system, developed in collaboration with the US, had saved “countless lives” since the crisis began and that he had pledged his “full support” to Mr Netanyahu to help replenish it and ensure his country’s security in future.

The Iron Dome was used to intercept many of the thousands of rockets Hamas launched at Israel, whilst Israel retaliated with days of heavy airstrikes on the Gaza Strip.

Mr Biden said that the US would work with the UN and other international partners to provide “rapid humanitarian assistance” and assist with “reconstruction efforts” in Gaza.

“We will do this in full partnership with the Palestinian Authority, not Hamas, in a manner that does not permit Hamas to simply restock its military arsenal,” he said.

“I believe the Palestinians and Israelis equally deserve to live safely and securely and enjoy equal measures of freedom, prosperity and democracy.”

Back in the region, both sides appear to be framing the ceasefire as a victory.

The Israeli cabinet announcement said the truce had been agreed unanimously and that the campaign had made “great achievements” – some of them “unprecedented”.

Hamas said its “resistance” was a “new victory and a new equation”.

Its representative in Lebanon, Osama Hamdan, said the group, viewed as a terrorist one in several countries, had obtained guarantees from mediators that the attacks on Gaza would stop.

It also claimed guarantees over the Sheikh Jarrah neighbourhood in Jerusalem and Al-Aqsa mosque – the issues largely blamed for starting the fighting.

Now the fighting has subsided and Palestinians can return to their homes, Hamas faces the daunting challenge of rebuilding a territory already suffering from poverty, widespread unemployment and a raging coronavirus outbreak.

The aerial bombardment means Palestinians now have limited or no access to water, according to the UN and aid agencies.

Gaza was already an impoverished region but officials said electricity was down to three to four hours per day, with 16,800 housing units damaged.

About 1,800 are unfit to live in and 1,000 were destroyed, according to the housing ministry.

The World Health Organisation said Israeli attacks have damaged at least 18 hospitals and clinics – with one health facility destroyed. Nearly half of essential drugs have also run out.

Meanwhile, Save the Children said 50 schools have been damaged across the area, and at least six have been destroyed. The advocacy group added that the education of almost 42,000 children will be disrupted while repairs take place.

The UK government has said it will provide a £3.2m aid package for civilians in Gaza.

Israel’s high-tech missile defence system has helped keep damage on its side comparatively low, shooting down many of the rockets in mid-air.

Among the 12 dead in Israel were a five-year-old boy, a 16-year-old girl and a soldier.

In Gaza, 65 children were killed, according to its health ministry.

Please use Chrome browser for a more accessible video player

Children getting trauma care killed in Gaza strikes

Israel has repeatedly insisted it goes to great lengths to avoid civilian casualties, including giving warning of strikes, and claims Hamas uses people as “human shields”.

Hamas and the smaller militant group Islamic Jihad said at least 20 of its fighters were killed, but Israel put it at least 130.

Meanwhile, Mr Netanyahu has come in for criticism from some political rivals – with one calling the ceasefire “embarrassing”.

Please use Chrome browser for a more accessible video player

Israel’s UK ambassador: ‘Millions of Israelis have been in bomb shelters’

Sky’s correspondent Mark Stone, who is in the region, said the elusive two-state solution was as far away as ever but that both sides are likely to gain politically.

Mr Netanyahu can portray himself as the “defender of the nation” after previously fighting for his political life, Stone said.

Hamas, meanwhile, will look to gain an advantage over Fatah – which runs the West Bank – in claiming to be the defender of the Palestinian cause.

UN Secretary-General Antonio Guterres said Israeli and Palestinian leaders have a responsibility to address the root causes of the conflict.

He added: “Gaza is an integral part of the future Palestinian state and no effort should be spared to bring about real national conciliation that ends the division.”