The Israeli cabinet agreed to the deal early Friday morning local time, roughly 24 hours after mediators announced an agreement to free Israeli hostages in exchange for Palestinian prisoners, in the first phase of US President Donald Trump's initiative to end the two-year war in Gaza.
"The government has now approved the plan for the release of all hostages - the living and the fallen," Israeli Prime Minister Netanyahu's X account said.
Israelis and Palestinians alike rejoiced after the deal was announced, the biggest step yet to end two years of war in which over 67,000 Palestinians have been killed, and return the last hostages seized by Hamas in the deadly attacks that started it.
Hamas' exiled Gaza chief Khalil Al-Hayya said he had received guarantees from the United States and other mediators that the war was over.
Under the deal, fighting will cease, Israel will partially withdraw from Gaza and Hamas will free all remaining hostages in exchange for hundreds of prisoners held by Israel.
Trump said the hostages should be released early next week.
Fleets of trucks carrying food and medical aid would be allowed to surge into Gaza to relieve civilians, hundreds of thousands of whom have been sheltering in tents after Israeli forces destroyed their homes and razed entire cities to dust.
The accord, if fully implemented, would bring the two sides closer than any previous effort to halt a war that has deepened Israel's international isolation and evolved into a regional conflict, drawing in Iran, Yemen and Lebanon.
Much could still go wrong. Even after the deal was signed, a Palestinian source said the list of Palestinians to be released was not finalised.
The group is seeking freedom for some of the most prominent Palestinian convicts held in Israeli jails, as well as hundreds of people detained during Israel's assault.
Further steps in Trump's 20-point plan have yet to be discussed. Those include how the shattered Gaza Strip is to be ruled when the fighting ends and the ultimate fate of Hamas, which has so far rejected Israel's demands it disarm.
Netanyahu also faces scepticism from within his governing coalition. Far-right National Security Minister Itamar Ben-Gvir said he would vote to bring down the government if Hamas is not dismantled. He also said he would vote against the deal, as expected.
But the announcement of an end to fighting and return of hostages was greeted with jubilation.
'ALL OF THE GAZA STRIP IS HAPPY' "Thank God for the ceasefire, the end of bloodshed and killing," said Abdul Majeed Abd Rabbo in Khan Younis in southern Gaza.
"All of the Gaza Strip is happy, all the Arab people, all of the world is happy with the ceasefire and the end of bloodshed."
Einav Zaugauker, whose son Matan is one of the last hostages, rejoiced in Tel Aviv's so-called Hostages Square, where families of those seized in the Hamas attack that triggered the war two years ago have long assembled.
"I can't breathe, I can't breathe, I can't explain what I'm feeling ... it's crazy," she said, speaking in the red glow of a celebratory flare.
In Gaza, Israeli attacks continued before the official start of the ceasefire, but there were far fewer fatalities than the scores killed on a daily basis in recent weeks.
Local health authorities said an airstrike on a residential building in Gaza City killed at least four Palestinians and wounded dozens of others, with many more still missing under the rubble. The Israeli Army Radio said the target was two Hamas militants.
At least three other Palestinians were killed by Israeli fire during the day, according to the Gaza Health Ministry.