Nearly 500 Palestinian prisoners were released by Israel on Tuesday, all in exchange for detained Israeli soldier Gilad Shalit.

The 477 people -- many of whom were serving life sentences -- who were bused back to the Gaza Strip, West Bank and other parts of Israel will be joined by another 550 prisoners in the next few months.

The freed Palestinians were greeted like a concurring army. Some of them, including Marwan Barghouti, had been in prison for nearly a decade. Barghouti had been serving five life sentences for multiple murders relating to the Second Intifada, which he is said to have helped organize.

In exchange, Palestinian political body Hamas sent Shalit from Gaza into Egypt, where he was intercepted by mediators, then back home to Israel. He was greeted by Prime Minister Benjamin Netanyahu and his father Noam.

Shalit was 19 when he was captured by Palestinian militants in 2006. As an enlisted soldier, Shalit was guarding an Israeli army outpost near the Kerem Shalom kibbutz on the Gaza Strip-Israel border when he was attacked and taken prisoner.

Israel immediately initiated a military mission to rescue Shalit, which failed, but left a number of Palestinians dead. After that, Hamas proposed a number of prisoner exchanges, all of which were rejected by the Israeli leadership.

Finally, Prime Minister Benjamin Netanyahu announced an approved deal last Tuesday, after a closed-door meeting with his staff. The deal to free Shalit was voted through 26-3 by Netanyahu's cabinet.