A "mutual and simultaneous" ceasefire between Israel and Hamas came into force at 2am local time (11am NZ time).
The ceasefire was set by Egyptian mediators, and US President Joe Biden pledged to salve the devastated Gaza Strip with humanitarian aid after the worst fighting in years.
Palestinians, many of whom had spent 11 days huddled in fear of Israeli shelling, poured into Gaza's streets. Mosque loud-speakers feted "the victory of the resistance achieved over the Occupation (Israel) during the 'Sword of Jerusalem' battle."
In the countdown to the cease-fire, whose timing Hamas had publicly confirmed but Israel had not, Palestinian rocket salvoes continued and Israel carried out at least one air strike.
Each side said it stood ready to retaliate for any truce violations by the other. Cairo said it would send two delegations to monitor the ceasefire.
The violence erupted on 10 May, triggered by Palestinians' anger at what they assailed as Israeli curbs on their rights in Jerusalem, including during police confrontations with protesters at Al-Aqsa mosque during the Ramadan fasting month.
The fighting meant many Palestinians in Gaza could not mark the Eid al-Fitr festival at Ramadan's conclusion. On Friday, throughout Gaza, postponed Eid al-Fitr meals were held instead.
Gaza health officials said 232 Palestinians, including 65 children, had been killed and more than 1900 wounded in aerial bombardments. Israel said it had killed at least 160 combatants.
Authorities put the death toll in Israel at 12, with hundreds of people treated for injuries in rocket attacks that caused panic and sent people rushing into shelters.
Hamas, the Islamist militant group that rules Gaza, cast the fighting as successful resistance of a militarily and economically stronger foe.
The Israeli Security Cabinet earlier issued the following statement stating it accepted the recommendation for a "bilateral unconditional ceasefire".
"The Security Cabinet convened tonight.
"The Political Security Cabinet unanimously accepted the recommendation of all security officials, the chief of staff, the head of the Shin Bet [internal security agency], the head of the Mossad [foreign intelligence] and the head of the National Security Council, to accept the Egyptian initiative for a bilateral unconditional ceasefire, which will take effect at a later date.
"The chief of staff, the military echelon and the head of the GSS reviewed before the ministers Israel's great achievements in the campaign, some of which were unprecedented.
"The political echelon emphasizes that the reality on the ground will determine the continuation of the campaign."
In Israel, relief was bittersweet.
"It's good that the conflict will end, but unfortunately I don't feel like we have much time before the next escalation," Eiv Izyaev, a 30-year-old software engineer, said in Tel Aviv.
Amid growing global alarm, Biden had urged Israeli Prime Minister Benjamin Netanyahu to seek de-escalation, while Egypt, Qatar and the United Nations sought to mediate.
In a televised address on Thursday, Biden extended condolences to bereaved Israelis and Palestinians and said Washington would work with the United Nations "and other international stakeholders to provide rapid humanitarian assistance" for Gaza and its reconstruction.
Biden said aid would be coordinated with the Palestinian Authority - run by Hamas' rival, President Mahmoud Abbas, and based in the Israeli-occupied West Bank - "in a manner that does not permit Hamas to simply restock its military arsenal".
Hamas is deemed a terrorist group in the West and by Israel, which it refuses to recognise.
Hamas previously demanded that any halt to the Gaza fighting be accompanied by Israeli drawdowns in Jerusalem. An Israeli official told Reuters there was no such condition in the truce.
UN Secretary-General Antonio Guterres told reporters Israeli and Palestinian leaders had a responsibility beyond the restoration of calm to address the root causes of the conflict.
"Gaza is an integral part of the future Palestinian state and no effort should be spared to bring about real national reconciliation that ends the division," he said.