After five years of imprisonment by the militant group Hamas, Israeli soldier Gilad Shalit went home to his family overnight in exchange for more than 1,000 Palestinian prisoners.

Sergeant Shalit and hundreds of Palestinians crossed Israel's borders in opposite directions in an exchange which brought joy to families on both sides.

When television cameras showed Sergeant Shalit walking out of captivity in Gaza and into Egypt, it was the first glimpse Israelis have had of him since 2009, when Hamas released a video to prove he was still alive.

He was then taken to an Israeli military base for a brief meeting with prime minister Benjamin Netanyahu and other top officials before being reunited with his family.

Gilad Shalit: Fast facts

The corporal and tank gunner was captured on June 25, 2006, by militants who tunnelled their way out of Gaza and then forced him back over the border.

Gilad Shalit, promoted to sergeant since his capture, was 19 at the time and had begun his mandatory three-year army service nearly a year earlier.

The last sign of life received from the soldier was a videotape released by his captors in September 2009 showing Sergeant Shalit, pale and thin, pleading for his life. He has not had any visits from the International Committee of the Red Cross.

Sergeant Shalit was the first Israeli soldier to be captured by Palestinian militants since 1994, when Hamas gunmen abducted Corporal Nachshon Wachsman. Corporal Wachsman, two of his captors and an Israeli special forces officer died in a rescue attempt.

Sergeant Shalit's family and friends have kept his plight in the spotlight. They set up a protest tent outside the prime minister's office in Jerusalem and Sergeant Shalit's face is emblazoned on car bumper stickers across the country.

At the age of 25 he no longer looks like the teenager who was captured by Hamas militants while on patrol near the Gaza border more than five years ago.

Looking thin and gaunt, with dark circles under his eyes, he said he felt in "good health" and thanked all those who worked for his release.

"Obviously I miss my family a lot and also I miss my friends and I miss meeting normal people to talk to them, to tell them about my experience through these years in captivity. I have a lot to do when I am free," he said.

"I think the Egyptians succeeded [in achieving the deal] because of their good relations with Hamas and the Israeli side. These good relations helped complete the deal."

While the exchange went smoothly and was hailed a success by both sides, it does not appear to have helped the stalled peace process between the Palestinians and Israelis.

The decision to release 1,000 Palestinian prisoners in exchange for Sgt Shalit's return is widely supported in Israel, where most Jewish families send their sons and daughters into army service and expect in return that the state will do all it can to bring their soldiers home, alive or dead.

In Sgt Shalit's tiny hometown of Mitzpe Hila, supporters and friends waited for his arrival.

"We've been together since we were in kindergarten. It's a very small place. Everybody knows everybody," Liora Ostrow said.

As evening fell, Sgt Shalit was driven up the last road to the family home.

Sergeant Shalit has been popularly portrayed as "everyone's son" and opinion polls showed that an overwhelming majority of Israelis backed the thousand-for-one deal, although many of the prisoners going free were convicted of deadly attacks.

Some of the prisoners have spent 30 years behind bars for attacks against Israel and its occupation of land taken in the 1967 Middle East War.

At one checkpoint in the West Bank there were clashes with Israeli soldiers when Palestinian men began throwing rocks in frustration at the apparent delay in the prisoners' release.

In one village a huge convoy of cars followed cousins Nael and Fakri Barghouti to an outdoor ceremony, who have been jailed since the late 1970s.

Gaza declared a national holiday and schools were closed.

Some high-profile prisoners:

Yehya Al-SinwarThe brother of the senior Hamas armed wing commander who some Israelis say helped plan the cross-border raid in 2006 in which Gilad Shalit was captured.

Nasser YataymaYatayma was jailed for involvement with militants of Hamas's armed wing convicted of perpetrating a 2002 suicide bombing at a Netanya hotel that killed 30 people, the deadliest of a string of attacks committed during a Palestinian uprising.

Ahlam TamimiThe former reporter with a local television station was jailed on charges of taking suicide bombers to locations she helped choose as a member of the Hamas armed wing, including a Jerusalem pizzeria bombed in 2001, killing 15 people, for which she received 16 life sentences.

Amana MonaThis Palestinian activist was given a life sentence for using an internet chatroom and promises of sex to lure a 16-year-old Israeli to his death in January 2001, when she was 24. Mona pretended to be an American tourist and persuaded him to go with her to the West Bank where he was shot dead. She was given a life sentence.

The road from the Egyptian border was turned into a military zone and sealed off. Dozens of masked, heavily-armed men of the Izz el-Deen Al-Qassam militia waited in convoy to escort buses carrying the freed men north to Gaza city.

"I think the deal represents something great for the Palestinian people. Those who are still in jail are happy for those who have been released," said Hamas deputy leader in exile Moussa Abu Marzouk, who greeted prisoners arriving in Egypt from Israel.

Patriotic songs blared from loudspeakers as prisoners arrived at the Rafah crossing. Some kissed the soil as they arrived. Some were carried on the shoulders of happy relatives.

Hamas leader in Gaza Ismail Haniyeh joined scores of officials to greet freed prisoners coming in from Egypt, along with hundreds of family members impatient for the big reunion.

Mr Haniyeh kissed their foreheads, paying special respect to Yehya Al-Sinwar, a top Hamas security strategist who spent 23 years in jail, and his deputy Rawhi Mushtaha who was also serving a life sentence.

"Thank you to the forces of the resistance for returning us as liberated heroes," said one prisoner.

In the West Bank, hundreds of Palestinians waving flags of Palestinian parties including Hamas and the Fatah movement led by Mr Abbas gathered at a crossing where they expected Israel to set the prisoners free.

They danced, sang and played national songs all morning.

But violence erupted when the Israelis announced over loudspeakers that the prisoners had been taken by an alternative route. Frustrated youths hurled rocks and Israeli security forces responded with tear gas.

High price

The deal received a green light from Israel's Supreme Court late on Monday after it rejected petitions from the public to prevent the mass release of prisoners.

Sergeant 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 troops and settlers from Gaza in 2005, tightened its blockade of the small coastal enclave after Sergeant Shalit's disappearance.

The deal with Hamas, a group classified by the United States and European Union as a terrorist organisation over its refusal to recognise Israel and renounce violence, is not expected to spur peace negotiations.

Those talks, led by Israel and Mr 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, Sergeant Shalit was reunited with his parents, whose public campaign for his release put pressure on Mr Netanyahu to make a deal with a bitter enemy.

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 Sergeant 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.

Meanwhile, Hamas and other Gaza militant groups have vowed to seize more Israeli hostages for exchange until all Palestinians still in Israeli prisons are released.

"The rest of the prisoners must be released because if they are not released in a normal way they will be released in other ways," said Mr Abu Marzouk.

Free trade is the oldest argument in federal politics and the issue that literally defined the federation era but opposition exists to the TPP, courtesy of the Investor-State Dispute Resolutions clause.