The first phase of a prisoner swap deal between Hamas and Israel has now concluded, with over 400 Palestinian prisoners released by Israel in exchange for the handing over of Gilad Shalit, an Israeli soldier who was captured by Hamas five years ago.
Shalit was handed over to Egyptian officials at the Rafah border crossing between Gaza and Egypt, and was then taken by Israeli officials to the Tel Nof air base.
The release prompted the release of 477 Palestinian prisoners by Israel to Gaza and elsewhere.
In an interview with Egyptian television at Rafah, Shalit said that he hoped that the deal that allowed for his release on Tuesday would help Israelis and Palestinians achieve peace.
"I will be very happy if all Palestinian prisoners are freed so they can go back to their families [...] I hope this deal could help reach peace between Israelis and the Palestinians and strengthen cooperation," he said.
He said that he feared that he would be in captivity for "many more years", but was "very excited" to be headed home.
Shalit was in Israeli hands for the first time in five years and four months, reported Al Jazeera's Cal Perry from Jerusalem.
He was received by Israeli army officers and doctors, and was in "good and stable health" a statement from the Israeli army said.
He was allowed to speak with his family over the telephone at an Israeli army base near the crossing point, and then flown via helicopter to the Tel Nof air base in central Israel, to be reunited with his family and to meet with senior Israeli officials, including Prime Minister Binyamin Netanyahu, the statement said.
PM Netanyahu warned the released Palestinian prisoners that if they were deemed to have returned to violence, they would be punished.
"We will continue to fight terror and every released terrorist who returns to terror will be held accountable."
Shalit later will be flown to his home in northern Israel.
Speaking to Al Jazeera, Mark Regev, the Israeli PM's spokesman, said that his government had allowed the Red Cross regular access to Palestinian prisoners, adding "they didn't look like [Shalit], who's come out of five years living in a hole under the ground".
"We are releasing today people who are guilty of the most heinous crimes against humanity. People who blew up bombs in restaurants, killing families, killing children," he said.
On Shalit's comments regarding his hope that the swap will help in any negotiations regarding peace, Regev said:
"I think Gilad Shalit was expressing the hope of all Israelis, that we hope to live in peace and reconciliation with our neighbours. [...]
"We hope it is indeed possible. The Palestinian side so far says that they are not willing to talk to us. We hope they change."
After Shalit was handed over, groups of Palestinian prisoners were sent by bus to Gaza via Rafah, reported Al Jazeera correspondent Nicole Johnston from the border crossing, where Hamas' military wing has been out in force.
Al Jazeera's Sherine Tadros in Cairo said Shalit was accompanied by Ahmed Jabbari, the head of Hamas' al-Qassem military wing, on the Egyptian side of the Rafah crossing before being transferred to Israel.
Earlier, in Israel, 96 Palestinian prisoners left the Ketziot prison, bound for the Ofer military camp near the West Bank city of Ramallah, public radio reported early on Tuesday morning.
Another 334 were transferred to the Kerem Shalom crossing, at the southern-most point of the Israel-Gaza border. The first prisoners were dressed in civilian clothes, with their hands and feet manacled, the radio report said.
A convoy of vehicles left the Israeli Katsiout prison in Naqab, near the Egyptian border, before dawn on Tuesday. Vehicles carrying female prisoners also left HaSharon Prison in central Israel.
At the Beituniya border crossing, a "great sense of excitement" quickly evaporated after a last-minute change of plans meant that prisoners would not be brought in through the checkpoint to meet their families, Al Jazeera's Charles Stratford reported.
After the announcement, the assembled crowd threw stones at the Israeli border post, prompting them to retaliate with tear gas and water cannon.
The prisoner swap process began with Shalit being handed over to Egyptian officials at Rafah. He was confirmed by them to be alive and in good health.
Israel was then to release 27 women prisoners, after which Shalit was to cross into the Egyptian Sinai.
Shalit, now 25, was captured in June 2006 by fighters who crossed into Israel from the Gaza Strip, governed by Hamas.
Israel has deployed a heavy security contingent of more than 1,000 police officers to secure the routes of the prisoner convoys, and both Israel and Hamas kept tight control on information until after the release of both Shalit and the Palestinian prisoners.
The swap, in which a total of 1,027 Palestinian prisoners are to be released in two phases, began a day after Israel's supreme court rejected appeals to halt the deal.
Relatives of Israelis killed by some of the Palestinians set to be released had urged the court to intervene, but it ruled against them, saying the matter was a political decision outside its domain.
Hamas has declared Tuesday a national holiday and erected a giant podium in Gaza City's al-Katiba Park, where it plans to transport the prisoners after they cross into the Palestinian enclave from Egypt.
Ismail Haniya, the prime minister, and members of the de facto Hamas government in Gaza, leaders of other factions, relatives and tens of thousands of onlookers were expected to welcome the prisoners.
Three days of celebrations were planned across the occupied West Bank, with President Mahmoud Abbas welcoming returning prisoners.
Saree Makdisi, an author and professor at the University of California, told Al Jazeera that the value of the prisoner swap should not be over-estimated.
"We have to remember that the Israelis raid the West Bank literally on a nightly basis, usually ten times a day, an average of 300-400 raids a month," he said.
"On all these raids, they collect prisoner after prisoner, so in an average month, they capture 300-400 prisoners, held against international law, held in appalling circumstances."