Kidnapped Israeli soldier Gilad Shalit and hundreds of Palestinians will return home Tuesday in an exchange with the Hamas movement that rules Gaza that Israeli Prime Minister Benjamin Netanyahu called a historic deal.

With the release, the long, painful saga of Shalit's incarceration will come to an end. Shalit was abducted in 2006 while he was active in the army and was imprisoned for five and half years by the militant group Hamas in the Gaza Strip at an unknown location. Hamas denied the International Red Cross and international human rights organizations any access to him.

Meanwhile, Israel acknowledged its inability to rescue Shalit in a military operation even though he was held no more than a few miles from the border. Hamas officials warned the precedent will encourage capturing more Israeli soldiers to get their own people freed.

Shalit's release was mediated by Egypt, and its role may improve strained ties with Israel.

Shalit is to enter Egypt from Gaza on Tuesday and be immediately returned to Israel. His first stop will be for medical checkups and then he will be flown to the Tel Nof air base to be reunited with his family. Netanyahu and other senior officials will be present to greet the soldier.

Shalit's privacy will be guarded at any cost, said Israeli officials, but a low-key ceremony has been arranged for him. The Hamas leaders, on the other hand, are planning a grand reception to celebrate the release of the 1,027 prisoners in exchange for Shalit.

Shalit's imprisonment received the longest media attention in recent Israeli history. Media campaign included mass marches, messaging polls and tent encampment, which will all end with Shalit's return.