Prime Minister Benjamin Netanyahu's cabinet voted early Wednesday morning to approve a prisoner swap that will see Gilad Shalit, the IDF soldier who has been in Hamas captivity for the last five years, return to Israel.

Twenty-six ministers voted in favor of the deal, and three ministers - Foreign Minister Avigdor Lieberman, National Infrastructure Minister Uzi Landau of Yisrael Beiteinu and Vice Prime Minister Moshe Ya’alon of Likud - voted against the proposal.

According to the agreement framework presented by Shin Bet chief Yoram Cohen, the deal Netanyahu brought before the cabinet included, at first, the release of 450 Palestinian prisoners, including 280 with life sentences.

110 prisoners will be released to their homes in the West Bank and East Jerusalem, out of whom 55 are Hamas men, with the rest belonging to Fatah and the other Palestinian groups.

According to the deal, 131 Gaza residents will be released back to the coastal Strip, many of whom are reportedly top Hamas operatives. Another 203 prisoners will be expelled from the West Bank, 40 of whom will be deported overseas and the rest to Gaza.

In addition, 6 Israeli Arab prisoners who have been serving for many years will also be released to their homes. The deal also specifies the release of 27 female inmates: terrorists Ahlam Tamimi and Amna Muna will be deported, with the rest of the female inmates are expected to be released to their homes.

The second wave of releases will take place in two months time, at which point Israel will release 550 prisoners of its choosing.

In a briefing with reporters, the Shin Bet chief indicated that senior Hamas West Bank operatives the militant group demanded be set free – such as Abdullah Barghouti, Ibrahim Hamed, Abbas Sayed, and others – will not be released from jail.

Ahmed Saadat, secretary-general of the Popular Front for the Liberation of Palestine, will also remain in prison, as well as Fatah strongman Marwan Barghouti.

About half of those released to the West Bank will live under restrictions that include prohibiting them from exiting the West Bank and, in some cases, the towns in which they live.

Cohen added that the Shin Bet supported the newly signed deal since releasing Shalit by means of military operation was deemed impossible.

"The security establishment finds this release very difficult," Cohen said, adding: "It's easier for me to be tough. We had no possibility or better way of releasing Shalit, so we backed the deal."

"It's not a good deal, but, on the other hand, it's the only way if we want to bring him home," the Shin Bet chief said, adding: "Hamas had to show flexibility as we did. What happened in Syria created instability and a need for Egyptian backup."