By Nidal al-Mughrabi and Tom Perry
GAZA/RAMALLAH (Reuters) - Palestinians in the Gaza Strip and West Bank gave jubilant welcomes on Tuesday to hundreds of prisoners freed by Israel in exchange for the release of Gilad Shalit, the soldier held for five years by the Gaza's Islamist rulers, Hamas.
Delirious crowds in the blockaded Gaza enclave hailed the thousand-to-one swap as a victory for Hamas over Israel.
"We want a new Gilad," they chanted, backing Hamas vows to capture more Israeli hostages to trade.
Newly released prisoners, laughing and smiling, reached out of bus windows to shake hundreds of hands as their convoy -- headed by Hamas leader Ismail Haniyeh sitting on the roof of a saloon car -- crawled north to Gaza city along the 40 km (25 mile) route from Egypt, where they were set free.
Masked and heavily-armed men of the Izz el-Deen Al-Qassam militia provided an escort through thousands of cheering, flag-waving Palestinians lining both sides of the road.
In the West Bank, split from the Gaza enclave by Israeli territory, thousands including supporters of Hamas and its rival Fatah packed the compound of President Mahmoud Abbas for an official welcome ceremony.
"You will see the results of your struggle in the independent state with its capital Jerusalem," said Abbas, leader of Fatah whose militants were driven out of Gaza by Hamas in a brief civil war in 2007.
In a rare display of national unity, he and Hassan Youssef, a senior member of arch-rival Hamas, spoke at the same podium.
Of 477 prisoners set free, 27 were women. More than twice as many went to Gaza as to the West Bank, while 41 were flown from Cairo to exile in Turkey, Syria or Qatar. Under the deal, a further 550 will be liberated in the coming months.
Some 5,000 Palestinians still remain behind bars in Israel, most convicted of violent acts over years of armed resistance to Israel. But Hamas said the swap should give them hope of freedom as well.
LIBERATE THE REST
"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.
A spokesman for Hamas armed wing made the threat to capture more hostages explicit: "We say to the people of the enemy: Your leadership has brought upon you a new battle by refusing to grant freedom to the other prisoners."
Patriotic songs blared from loudspeakers as prisoners arrived to a heroes' welcome at the Egyptian border crossing. Some kissed the soil of Gaza, some were lifted onto the shoulders of happy relatives.
In Gaza city, a densely-packed sprawl of low-rise concrete on the Mediterranean coast in sight of Israel, tens of thousands rallied before a stage decorated by a mural bearing portraits of top militants who were not released.
"We will not forget you," said the slogan.
Yehya Al-Sinwar, a top Hamas security strategist who spent 23 years in jail and is now tipped for a top post in the Hamas leadership, was cheered by the rally and mobbed on stage.
"I call on all the leaders of the Palestinian resistance factions and foremost the Izz el-Deen Al-Qassam to shoulder the responsibility for liberating the remaining prisoners in the shortest time possible," he said.
"This must be turned immediately into a practical plan."
The web of electricity cables over Gaza's main streets was festooned with the green flags of Hamas.
A wall painting lampooned Israeli Prime Minister Benjamin Netanyahu, depicting him with his face ground into the dirt by the boot of a gunman, signing a paper with words "Swap deal."
Hamas gunmen seized Shalit in a border raid in 2006. It has declared the prisoner exchange a vindication of its policy of armed resistance over the peace-seeking policy of Abbas.
Israel is setting free 1,027 Palestinians in return for the liberty of Shalit. Some have spent 30 years and more in jail.
(Additional reporting by Tom Perry and Shaimaa Fayed; writing by Douglas Hamilton; editing by Philippa Fletcher)