Israeli PM Benjamin Netanyahu said they agreed only after arduous talks, and that Sergeant Gilad Shalit, 25, would be back with his family “within days”.
In exchange, Israel said will release hundreds of Palestinian prisoners.
Gilad Shalit was captured in a cross-border raid five years ago, and attempts to negotiate his release have failed.
Israeli PM said in a national TV address:
“We have concluded arduous negotiations with Hamas to release Gilad Shalit. He will be coming home in the next few days.”
Gilad Shalit’s continued detention is a hugely emotive issue in Israel, where his family has maintained a high profile campaign for his release.
According to a senior Israeli official, there are some high-profile Palestinian prisoners that have been excluded from the release deal.
The Israel and Hamas deal was confirmed in the Israeli cabinet by a 26-3 vote, following a heated three-hour debate.
“This is a difficult decision, but leadership is tested at moments like this, on the ability to make difficult decisions,” said PM Benjamin Netanyahu in a statement.
On the other hand, Hamas said in a statement that there were tens of thousands of people on the streets celebrating the deal, firing guns into the air and honking car horns.
Hamas’s leader Khaled Meshaal, who is in exile in Syria, appeared on TV to hail the swap deal as a victory for the Palestinian people.
Khaled Meshaal said the Israel had agreed to release 1,027 prisoners – including 27 women.
According to Yoram Cohen, head of Israel’s Shin Bet internal intelligence service, the high-profile prisoners not due for release include key Fatah leader Marwan Barghouti, Ahmed Saadat, found guilty of ordering the killing of Israel’s tourism minister in 2001, and Hamas’ Abdullah Barghouti.
“It is a great achievement, a qualitative success,” said the militant group’s leader, Khaled Meshaal.
“Because of this accord, there will no longer be any women in the jails of the enemy.”
Hamas leader promised to carry on working to free every Palestinian prisoner held in Israeli jails.
About 5,000 Palestinians are now held by Israel – some of whom have been convicted of serious crimes, but others are being held without charge.
Local Israeli television, Channel 2 TV reported that both sides, Israel and Hamas, had shown greater flexibility in recent talks.
Indirect talks over the Gilad Shalit ‘s release have been going on for years, with Egypt and Germany mediating.
In October 2009, Hamas released a video of Gilad Shalit calling on Benjamin Netanyahu to do everything to free him.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…