Israeli soldier Gilad Shalit returned to his hometown Tuesday more than five years after he was captured, in an exchange involving hundreds of Palestinian prisoners released in the first part of a prisoner swap.

Israel freed 477 prisoners Tuesday in exchange for Shalit, who had been held by Hamas-allied militants in Gaza.

The prisoner swap is not yet complete — another 550 Palestinians are set to be released at a later date. 

Palestinian officials said a vehicle filled with armed men whisked Shalit, 25, across the Egyptian border and quickly returned to Gaza early Tuesday. From there, he was taken to a military base and was later flown home by helicopter. 

Buses of Palestinian prisoners were also moved out of Israel, part of the process that will eventually see 1,027 Palestinians released.

A few hours after news broke that he had been released, Shalit was seen on Egyptian TV, wearing a black hat and being taken from an SUV. A short time later, the Israeli military confirmed he had arrived on home soil.

Brig.-Gen. Yoav Mordechai told a news conference that "Today, Gilad Shalit is with us."

Priceless exchange

Robi Damelin, whose son David's Palestinian killer was set free Tuesday in a prisoner exchange between Israel and Hamas, told CBC's Heather Hiscox in an interview from Tel Aviv that seeing Shalit and his mother smile upon his release makes the swap "worth everything."

"I think there is nothing more important than human life," said Damelin, who belongs to a group of grieving Israeli and Palestinian parents working for peace and reconciliation. "There is no revenge for a lost child. I promise you I would release the whole world if it would bring my child back."

Damelin, who is originally from South Africa, added she has seen the "worst kinds of murderers" become "peacemakers" in that country following the collapse of apartheid and the truth and reconciliation process.

Not everyone welcomed the swap. Late Monday, Israel's Supreme Court decided not to intervene in the deal that would exchange more than 1,027 Palestinian prisoners for Israeli soldier Sgt. Gilad Shalit.

Several families of victims of Palestinian attacks against Israel had asked the top court to block the swap.

Shalit was later flown by helicopter from a military base to his hometown of Mitzpe Hila in northern Israel.

Large cheering crowds waving Israeli flags greeted the 25-year-old and his family when they arrived in the town. Police have reportedly closed off access to the community and limited access to the family home.

'Excited to taste freedom'

Shalit said in an interview that he was "very excited to taste freedom" and had missed his family and friends. He said he had feared he would remain in captivity "many more years" and worried since being told of the deal last week that last-minute hitches might cause it to collapse.

His face pale, Shalit said he was happy and healthy, and thanked the people involved in arranging his release. 

The interviewer asked Shalit if he would help campaign for the release of more than 4,000 Palestinians held in Israeli jails. Speaking through a translator on CNN, he said he would be happy for the prisoners to be released so they can go back to their families and their land.

He also said he hoped released prisoners wouldn't go back to fighting Israel.

Shalit told the interviewer he hoped the deal would help build the peace process and co-operation between Israelis and the Palestinians.

The Associated Press quoted Israeli military officials as saying Shalit, who underwent an entensive medical examination at an Israeli air base after his release, showed signs of malnutrition and lack of exposure to the sun after five years in Hamas captivity.

His father Noam Shalit told CNN that his son is still experiencing some lingering effects from injuries suffered during his initial capture, since he wasn't treated properly for shrapnel wounds.

"We hope that he'll be able to get back to normal life," his father said. "Today, really we can say that we have experienced the rebirth of a son."

Ecstatic celebrations in Gaza, West Bank

The arrivals of the prisoners set off ecstatic celebrations in the West Bank and Gaza Strip, where large crowds and dignitaries greeted them.

In Gaza, prisoners embraced and shook hands with Hamas leaders at the Rafah border crossing. Some prisoners were carried on the shoulders of others. Palestinian dignitaries formed a reception line, like at a wedding, shaking hands and in some cases hugging the prisoners.

Thousands of Palestinians gathered in Gaza City, where they held a mass rally to celebrate the swap.

In the West Bank, released prisoners were taken to the grave of iconic Palestinian leader Yasser Arafat. Palestinian President Mahmoud Abbas greeted them, and several thousand people filled the courtyard outside his headquarters to celebrate.

The return was marred by violence at a crossing between the West Bank and Israel. Military officials said troops fired tear gas to disperse a crowd that began to riot because of delays in the release. No injuries were reported.

CBC's Derek Stoffel said thousands of people packed into a square in Ramallah as the Palestinians were released.

"They were hoisting a couple of men and walking them through the streets as heroes," Stoffel said.

Stoffef said he talked to a number of prisoners who told him they never thought this day would happen.

Some 350 freed prisoners were sent to Gaza, while others were sent to the West Bank, The Associated Press reported.

About 40 of the Palestinians freed Tuesday are being exiled, Stoffel said.

People in villages and cities have been hanging colourful banners, and Stoffel said many households were preparing private reunions to welcome the released prisoners home.

Israel and Hamas will not talk directly to each other, so the exchange had to be negotiated through Egyptian mediators.

The swap went ahead despite criticism and court appeals in Israel against the release of the prisoners — with nearly 300 serving long sentences for involvement in deadly attacks.

The exchange involved a delicate series of staged releases, each one triggering the next. The Red Cross and Egyptian officials were involved in the movement of prisoners.

Turkey's state-run news agency says the country will take in some of the Palestinians freed in a swap deal with Israel. The Anatolia news agency did not say how many of the inmates Turkey will take, or when they would arrive. The agency did not cite a source for its report.

United Nations Secretary General Ban Ki-moon called the exchange a "significant humanitarian breakthrough," saying he has "long called for the end of the unacceptable captivity of Gilad Shalit and has also called for the release of Palestinian prisoners."

The statement said Ban hoped that "more far-reaching steps will be taken to end the closure of Gaza and enable reconstruction."

"He continues to call in the same context for an end to the smuggling of weapons and a sustained calm between Israel and Gaza," the statement said.

With files from The Associated Press