The Israeli cabinet approved a prisoner swap with Gaza's governing Hamas movement early this morning, prompting celebratory street parties in both Israel and Palestine.
Egyptian officials mediated a deal in Cairo under which Israel has agreed to release 1,027 Palestinians currently languishing in its jails in exchange for the return of Gilad Shalit, a soldier captured by Hamas in a 2006 cross-border raid following a similar act by Israeli forces.
As the news was announced hundreds of Israelis began dancing in the road outside Israeli Benjamin Prime Minister Netanyahu's Jerusalem residence, where Shalit's family had set up a protest tent.
Many waved flags bearing the 25-year-old's image and his father Noam said he would now dismantle his tent and go home.
In the Jabaliya refugee camp in Gaza Palestinians poured onto the streets, firing into the air and honking horns in celebration.
Netanyahu said Shalit would be home "in a few days" while Hamas chief Khaled Meshaal said the Palestinian prisoners would be released in two waves - an initial 450, including all women inmates, in a week's time and the rest two months later.
Meshaal said the deal was "a national achievement for the Palestinian people" and that Hamas had negotiated hard for the release to include "prisoners from different categories, different age groups, from the West Bank and Gaza, from Jerusalem and the Golan Heights."
It had prioritized those who had been in jail for over 20 years, he said.
Most inmates will be returned to their former homes but 203 will be deported, with 40 subject to an Israel-imposed ban on entering either Israel or Palestine.
Israel's Shin Bet intelligence agency chief Yoram Cohen said Israel had not granted all of Hamas's demands.
Fatah organizer Marwan Barghouti, Ahmed Saadat of the Popular Front for the Liberation of Palestine and Hamas militant Abdullah Barghouti were among those Israel refused to release.
But most Gazans appeared impressed with the deal.
"Israel wouldn't agree to free that many prisoners unless it was forced to," said shopkeeper Akram Nimr in Jabaliyah.
Israeli Infrastructure Minister Uzi Landau of the far-right Yisrael Beiteinu party appeared to agree, saying the swap was "a huge victory for terror."
This article originally appeared in the Morning Star.