Captured Israeli soldier Gilad Shalit has been handed over to Israeli authorities, in the latest step of a prisoner exchanged involving more than 1,000 Palestinian prisoners
"I missed my family," a gaunt Shalit, his breathing laboured at times, said in an interview with Egyptian TV conducted before he was transferred to Israel and broadcast after he went free.
"I hope this deal will promote peace between Israel and the Palestinians," he said.
Sgt Shalit (25) was taken across the frontier from the Gaza Strip into Egypt's Sinai peninsula and driven to Israel's Vineyard of Peace border crossing, where a helicopter awaited to fly him to an Israeli air base for a reunion with his parents.
Simultaneously Israel freed 477 Palestinian prisoners, most of them to the Gaza Strip, where Hamas leaders greeted former prisoners piling off buses bearing Red Cross insignia.
Palestinians, awaiting the release of prisoners at a West Bank checkpoint, hurled rocks at Israeli soldiers, who responded with tear gas, after the military announced to the crowd over a loudspeaker that the group had been taken to another crossing.
In the television interview, Sgt Shalit said he found out a week ago that he was to be released. The soldier, who had not been seen since a 2009 video was released, said he had feared he would be held "for many more years".
Political commentators said it appeared unlikely the prisoner exchange agreed by the two bitter enemies would have any immediate impact on Israeli-Palestinian negotiations that broke down last year.
The mood in Israel was one of elation, with "welcome home" signs on street corners and morning commuters watching live broadcasts of the swap on cellular telephones.
Sgt Shalit has been popularly portrayed as "everyone's son" and opinion polls showed that an overwhelming majority of Israeli backed the thousand-for-one deal, although many of the prisoners going free were convicted of fatal attacks.
For Palestinians, it was a time to celebrate what Hamas hailed as a victory, and a heroes' welcome awaited the released prisoners. Palestinians see brethren jailed by Israel as prisoners of war in a struggle for statehood.
"This is the greatest joy for the Palestinian people," said Azzia al-Qawasmeh, who waited at a West Bank checkpoint for her son Amer, whom she said had been in prison for 24 years.
The deal received a green light from Israel's Supreme Court late yesterday after it rejected petitions from the public to prevent the mass release of prisoners, many serving life sentences imposed by Israeli courts for deadly attacks.
Sgt Shalit was abducted in June 2006 by militants who tunnelled into Israel from the Gaza Strip and surprised his tank crew, killing two of his comrades. He was whisked back into Gaza and has since been held incommunicado.
Israel, which withdrew from Gaza in 2005, tightened its blockade of the small coastal enclave after Sgt Shalit's disappearance.
The deal with Hamas is not expected to spur peace negotiations.
Those talks, led by Israel and Palestinian president Mahmoud Abbas, a Hamas rival, collapsed 13 months ago in a dispute over settlement building in the occupied West Bank. Mr Abbas now wants the UN to recognise Palestinian statehood, a unilateral bid opposed by Israel and its main ally, the United States.
At Tel Nof air base in central Israel, Sgt Shalit will see his parents, whose public campaign for his release put pressure on prime minister Benjamin Netanyahu to make a deal with a bitter enemy. Mr Netanyahu will also meet Sgt Shalit there. Later, he will fly by helicopter to his family home in northern Israel.
The repatriation of captured soldiers, alive or dead, has long been an emotionally charged issue for Israelis. Many have served in the military as conscripts and see it as sacrosanct. But they also feel stung by the high price they feel Israel is paying for Shalit.
"I understand the difficulty in accepting that the vile people who committed the heinous crimes against your loved ones will not pay the full price they deserve," Mr Netanyahu wrote in a letter, released by his office, to bereaved Israeli families.