Hamas tentatively agreed to release Israeli prisoner Gilad Shalit in exchange for hundreds of Palestinian prisoners.

Israel's Prime Minister Benjamin Netanyahu held a meeting with his 29 cabinet ministers in Jerusalem on Tuesday, after which he announced that an agreement was finally summarized and both sides signed.

Staff Sargent Shalit was captured in 2006, when he was just 20 years old, crossing through the Kerem Shalom kibbutz on the Gaza Strip-Israel border. Hamas kept him isolated for five years. The political group let Shalit make and send a DVD only after Israel agreed to free 20 female Palestinian prisoners.

“If all goes according to plan, Gilad will be returning to Israel in the coming days,” Netanyahu said Tuesday. When I took office I took it upon myself, as a personal mission, to bring Gilad home to his family.

Our main mission -- to actually bring Gilad home -- was extremely difficult and the negotiations were grueling. With everything that is happening in Egypt and the region, I don’t know if the future would have allowed us to get a better deal -- or any deal at all for that matter. This is a window of opportunity that might have been missed, the Prime Minster told his cabinet.

Throughout the five-year saga, Hamas has demanded that Israel release thousands of prisoners in exchange for Shalit, many of whom were serving lengthy sentences. Up until recently, there has been little progress made during negotiations and often mediation sessions have resulted in military attacks.

Israel was concerned with angering its citizens, who could be family members of the victims of attacks carried out by those being released. Shalit's ongoing imprisonment has set off protests in Israel, as well as in France, of which Shalit is also a citizen.

The details of Tuesday's deal were not disclosed, but Shalit could be held by Hamas for an additionally month, according to reports.

The exchange deal of Palestinian prisoners for Shalit [will be] implemented at the beginning of this November, with Egyptian mediation, Saudi Arabia's Al-Arabiya TV said, YNet reported.

While both sides said they agreed, Shalit's fate won't be certain until he is back in Israeli hands. Deals have broken down at the eleventh hour in the past.

Meanwhile, 2,000 Palestinian prisoners in Israel are on a hunger strike to protest the solitary confinement of 20 of their countrymen. The prisoners joined 200 other detainees on Tuesday in the demonstration, and they are demanding better treatment behind bars, including access to university courses and Arab TV channels, according to YNet.

[Hamas] holds Israel fully responsible for the lives and safety of the prisoners... [it is] Israel’s abuses against those held in Israeli prisons that has inspired the hunger strike, the Palestinian group said in a statement last week.