If the first phase of the deal is carried out, there will be a second phase, in which Hamas would release the last of the hostages in return for a permanent ceasefire. A ceasefire will last so long as negotiations continue in the second phase.
Hamas is holding some 94 hostages in Gaza.
Israel will agree to withdraw from populated areas in the first phase and most areas of the Gaza strip once the deal is fully carried out, but is expected to hold some kind of buffer zone to enforce security.
During the negotiations, Israel will maintain some grip on the Philadelphi Corridor at the Gaza-Egypt border and the Netzarim Corridor in central Gaza.
A final phase is expected to include the return of bodies of deceased hostages in return for a post-war Gaza reconstruction plan.
President Biden said in a speech after the deal was reached that there was "no other way for this war to end."
"I am deeply satisfied this day has finally come," he said. "This has been a time of real turmoil in the Middle East, but [there are ...] genuine opportunities for a new future."
President-elect Trump also hailed the agreement in a post on Truth Social, writing in all caps that a deal was made.
The families of the American hostages held by Hamas said they were "grateful" for the news.
"We have been waiting for 467 days while our family members suffer from life-threatening injuries, abuse, torture, and sexual violence," they said in a statement. "We thank President Biden, President-elect Trump, and their teams for their constructive efforts to make this possible."
There was some skepticism from Trump's GOP allies on Capitol Hill. Rep. Brian Mast (R-Fla.), chair of the House Foreign Affairs Committee, said "we don’t trust Hamas."
"We trust that President Trump has put the fear of God into Hamas," Mast said in a statement.
But Democrats were more jubilant.
"This is welcome, long-overdue news," said Sen. Bernie Sanders (I-Vt.), who has long called for a ceasefire. "This is just the first step to restoring peace. The international community must insist that the ceasefire be sustained and formalized."
Israeli Prime Minister Benjamin Netanyahu has not yet confirmed the deal but said his government could do so soon. Hamas accepted the latest proposal.
Israeli forces and Hamas fighters have been fighting for some 15 months after the Oct. 7, 2023, deadly attacks on southern Israel that killed some 1,200 people and saw the kidnapping of around 250 hostages.
Since then, Israel has waged a destructive war in Gaza, crippling Hamas but also killing around 46,000 Palestinians.
The latest ceasefire and hostage release deal has been under intense negotiations, with mediation by the U.S., Qatar and Egypt, in on-and-off talks for more than a year.
The two sides last reached an agreement in late November 2023 to release around 100 hostages for a temporary ceasefire, the release of Palestinian prisoners and more aid into Gaza.
Israel also maintains a fragile ceasefire with Hezbollah in Lebanon after more than a year of fighting with the Iranian-backed group.
Read more on the deal at TheHill.com.