A freed Palestinian prisoner is greeted by people upon arrival in the southern Gaza Strip on Dec. 18. Israel released 550 Palestinian prisoners Sunday in the second stage of a deal with Hamas that brought home soldier Gilad Shalit after five years of captivity. (MOHAMMED SALEM/REUTERS)

Israel completed a prisoner exchange with the militant Hamas movement Sunday night, freeing 550 more Palestinian prisoners in the second stage of a deal that brought home Sgt. 1st Class Gilad Shalit, an Israeli soldier held captive in Gaza for more than five years.

Flashing V-signs and raising their arms in celebration, the freed prisoners were given heroes’ welcomes in separate ceremonies in the Hamas-ruled Gaza Strip and in the West Bank, where the rival Fatah movement is dominant.

Shalit, who was captured in June 2006 in a cross-border raid by militants from Hamas and two allied groups, returned home in October in the first phase of the lopsided exchange, in which Israel freed a total of 1,027 prisoners.

The hundreds of Palestinians freed in October included many Hamas members, among them those serving life sentences for involvement in suicide bombings that killed scores of Israelis, but most of those released Sunday were serving light sentences or nearing the end of their terms, and none were from Hamas or Islamic Jihad.

More than 500 were released to the West Bank and only 41 to the Gaza Strip, in an apparent gesture to Palestinian Authority President Mahmoud Abbas and his Fatah movement, who were largely sidelined in the first phase of the prisoner swap. Under the terms of the deal, Israel chose the prisoners who were freed Sunday.

Two prisoners were released to East Jerusalem, and two were sent to Jordan.

In a short ceremony in Gaza, Ahmad Bahar, a senior Hamas leader, paid tribute to the “resistance” and to the armed wing of the militant movement, which he said had “forced the Zionist occupation to submit to its conditions.”

“We say to the Zionist entity: “You must free the rest of the prisoners,” Bahar said. “If you do not, you will be forced to release them.”

In the West Bank, the freed prisoners, who arrived on buses escorted by Red Cross vehicles, said a prayer at the tomb of Palestinian leader Yasser Arafat before emerging to a cheering crowd at the presidential compound.

They were greeted by Palestinian officials, including Aziz Dweik, a Hamas leader in the West Bank who is the speaker of the Palestinian parliament.

At the Bitunia checkpoint near Ramallah, where the prisoners were handed over by the Israelis, clashes erupted between stone-throwing Palestinian youths and Israeli soldiers, who fired tear gas and rubber-coated bullets. More than a dozen Palestinians and a soldier were reported hurt.

Also Sunday, the Israeli government moved ahead with its plan to accelerate building in West Bank settlements and East Jerusalem, announcing that it would invite bids to construct more than 1,000 homes there. The new housing will be in the settlements of Beitar Ilit and Givat Zeev, and in Har Homa, a Jewish neighborhood of Jerusalem built on West Bank land annexed to the city.

Prime Minister Benjamin Netanyahu announced the stepped-up construction last month after the Palestinians were accepted as a member state in UNESCO.