Updated

An Israeli soldier freed after five years of captivity by Hamas militants says he is "very excited" to be headed home.

Appearing weak, pale and extremely thin in an interview with an Egyptian TV station, Sgt. Gilad Shalit says he was told about a week ago that he was being freed. He says he feared he would remain in captivity for "many more years" and remained afraid that "things may go wrong."

An Israeli military official says Shalit, is showing signs of malnutrition and lack of exposure to the sun after five years in captivity.

In a hard-won deal, Israel agreed to grant freedom to 1,027 Palestinian prisoners. 477 prisoners were freed on Tuesday, including 27 women -- several of which have spent decades behind bars -- in exchange for Shalit. Some 350 were sent to Gaza, the rest to the West Bank. Another 550 prisoners are slated to be released in two months.

More than 200 prisoners, originally from the West Bank, will instead be sent to the fenced-off Gaza Strip. And some 40 prisoners will be deported to Syria, Qatar, Turkey and Jordan, Palestinian officials said.

Israel's army has confirmed that Shalit is now on Israeli soil after Hamas militants in Gaza transferred him to Egypt earlier Tuesday.

Shalit landed at Tel Nof air base in central Israel on board a military helicopter for an eagerly awaited reunion with his family.

Shalit said he missed his family and friends and now has a lot to do.

Shalit's father, Noam, made a brief television appearance on his way to the base. Asked whether this was the happiest day of his life, he said: "Yes, you can make that assumption."

Noam Shalit has become a ubiquitous figure in Israel since his son's capture and led a massive campaign to press the government into bringing the 25-year-old home.

Israel is freeing hundreds of Palestinian prisoners in return.

The first buses of Palestinian prisoners freed in the swap with Israel reached the Gaza Strip Tuesday.

The deal, the most lopsided prisoner swap in Israeli history, caps a five-and-a-half-year saga that has seen multiple Israeli military offensives in Gaza, an Israeli blockade on the territory and numerous rounds of failed negotiations.

The swap got under way early Tuesday as Hamas whisked Shalit across Gaza's border with Egypt, while Israel simultaneously began freeing the Palestinian prisoners. At midmorning, Mahmoud Zahar, a Hamas leader in Gaza, said his group was no longer holding the soldier.

Hamas' Al-Aqsa TV reported that a high-level Hamas delegation arrived on the Egyptian side to hand over Shalit and to greet the returning prisoners.

Before dawn, convoys of white vans and trucks transported hundreds of Palestinian prisoners to the locations in the West Bank and on the Israel-Egypt border where they were to be freed.

Tens of thousands of Palestinians, many waving green Hamas flags, are celebrating at a mass rally in Gaza for the prisoners freed in the swap.

The planned celebrations for their release were to be attended both by officials from Hamas, the Islamic group that captured Shalit and negotiated the deal, and from the Palestinian Authority, the Western-backed government that wields partial control in the West Bank.

The swap drew an emotional response from some in Israel because of the number and identities of the prisoners.

Among those being released are militants involved in planning and executing suicide bombings in restaurants and on buses during the years of the second Palestinian uprising, which began in 2000.

One woman, Amna Muna, was convicted of luring an Israeli teenager over the Internet onto Palestinian territory, where another Palestinian killed him. Another prisoner, Nasser Yateima, was convicted of masterminding a hotel bombing that killed 30 people celebrating the Passover holiday in 2002.

Also among those being released were two Gaza militants convicted of playing minor roles in capturing Schalit. One filmed the operation on behalf of Hamas, and the second transported some of the militants who crossed into Israel, seized the soldier and killed two of his comrades.

Israel's Channel 10 TV said there was a delay at midmorning because two women were refusing to be sent to Gaza and instead asking to be sent to Egypt.

In the West Bank, Hamas' political rival, Palestinian President Mahmoud Abbas, addressed a crowd of thousands, including freed prisoners. Abbas praised them as "freedom fighters" and said Israel promised him to free more prisoners following the two-stage swap. It was the first mention of such a release.

Also in the West Bank, about 200 relatives of prisoners waited at a West Bank checkpoint as the exchange unfolded.

"We're so excited we can barely breathe," said Mariam Shkair, waiting for her brother, 52-year-old Abdel Latif, who spent 25 years in prison for killing an Israeli soldier. "We are waiting to hug him."

Some of the relatives raised Palestinian flags or the green banners of Hamas. A group of young men chanted, "We will continue our struggle."

The exchange, negotiated through Egyptian mediators because Israel and Hamas will not talk directly to each other, is going ahead despite criticism and court appeals in Israel against the release of the prisoners. Nearly 300 of them were serving lengthy sentences for involvement in deadly attacks.

Little is known about Shalit's condition. Although he appeared healthy in the only time he has been seen in captivity -- in a brief and scripted 2009 video released by Hamas -- he was denied all visits, including by the Red Cross, and the state of his mental and physical health is unclear.

Among Palestinians, the exchange appeared likely to strengthen Hamas, which is dedicated to Israel's destruction, at the expense of the rival Fatah movement, which dominates the Palestinian Authority and says it wants to peacefully create a Palestinian state alongside Israel.

In Israel, public pressure for a deal was intense. Thanks in part to a vocal campaign led by his parents, Shalit had become a symbol of national solidarity in a country where military service is mandatory for Jewish citizens and where the government is seen as responsible for bringing soldiers home.

In Israel, relatives of victims of Palestinian attacks filed court appeals aimed at stopping the deal. One was filed by the surviving members of the Schijveschuurder family, whose parents and three siblings were killed when a Palestinian suicide bomber blew up a Jerusalem pizzeria in 2001, killing 15.

At an emotionally charged Supreme Court hearing Monday, Noam Shalit, the soldier's father, urged the judges not to delay the exchange. Late Monday, the court decided not to intervene, removing the last hurdle for the deal to go through.

A poll published Monday showed an overwhelming majority of Israelis -- 79 percent -- supporting the deal. Only 14 percent were opposed.

The poll was carried out by the Dahaf Institute and published in the daily Yediot Ahronot. Pollsters interviewed 500 respondents, and the margin of error was 4.4 percentage points.

An Egyptian security official said that an American-Israeli dual national held since June in Egypt on suspicions of espionage would also be released shortly after the swap. Ilan Grapel will be released by Egypt in return for about 70 Egyptian prisoners, most serving sentences in Israel on charges of smuggling or illegal entry, the official said.

Israel has denied that Grapel, a law student who was traveling under his own name and whose connections to Israel were easily apparent on his Facebook page, was a spy.

The official spoke on condition of anonymity because he was not authorized to brief the media on the matter. He would not give a precise time for Grapel's release, and Israeli officials would not comment.

Newscore and The Associated Press contributed to this report.