Israel's Prime Minister Benjamin Netanyahu (R) greets Israeli soldier Gilad Shalit at Tel Nof air base in central Israel in this handout picture released October 18, 2011 by the Israeli Government Press Office (GPO).
Israel's Prime Minister Benjamin Netanyahu (R) greets Israeli soldier Gilad Shalit at Tel Nof air base in central Israel.

Gaza's Islamist rulers have released Israeli soldier Gilad Shalit in return for hundreds of Palestinian militants held by Israel after more than five years in captivity, a Hamas military source has said.

The source has said that Shalit, 25, was taken across the frontier from the Gaza Strip into Egypt's Sinai peninsula, where he was handed over to Egyptian officials, who will then take him across to Israel's Vineyard of Peace.

There was no immediate confirmation from Egypt of Israel that Shalit had been released.

Israel was to release 477 Palestinian prisoners during the day on buses in the first part of the exchange. Some were due to be taken to the Sinai and handed over to Egyptian officials for transfer to the Gaza strip, which is run by Hamas. Others were due to go free in the occupied West Bank.

Among those set free in the operation are prisoners who were serving life sentences for deadly attacks.

Around 40 are being sent into exile to Turkey, Syria and Qatar. A further 550 Palestinians are to be released in a second stage of the agreement, expected in around two months.

The Shalit swap is expected to be the first time that a captured Israeli soldier has been returned alive.

The deal, which was signed last week between Israel and its bitter enemy the Hamas, is the highest price ever paid for by the Jewish state for one person.

The deal went through on Monday after it rejected petitions from the public to prevent the mass release of prisoners, headed by families who had lost people in the Palestinian attacks.

Some 297 prisoners were being driven to the Egyptian side of the Rafah crossing where they will then be greeted by Hamsas figures before entering Gaza.

"We are on the way to Rafah with Mussa Abu Marzuk and Sheikh Salah al-Aruri to welcome the liberated prisoners," spokesman Izzat al-Rishq told Hamas's Al Aqsa television in Gaza.

"The operation to return Shalit to the Israeli side will take place at the moment we are assured that all the prisoners have arrived at the Egyptian border."

Mr Shalit was abducted on June 25 2006 when he was 19 by militants who tunnelled into the Gaza strip and surprised his tank crew, killing two of his comrades. He has since been held out of sight and was last seen looking pale and thin in a 2009 video shot by his captures.

Three days after he was captured, Israel launched a massive military operation against Gaza in a bid to secure his release. The attack lasted five months and left more than 400 Palestinians dead.

The deal with the Hamas group, who are classified by the US and European Union as a terrorist organisation over its refusal to recognise Israel and renounce violence, is not expected to have a direct impact on efforts to revive Middle East peace talks.

Crowds gathered in both Gaza and the West Bank to welcome back the return of their prisoners.

"This is the greatest joy for the Palestinian people," said Azzia al-Qawasmeh, awaiting at a West Bank checkpoint for her son Amer, who she said had been in prison for 24 years.