Thousands of Palestinians gathered at Ramallah and Gaza city to welcome the detained Palestinian prisoners released by Israel on Sunday.

The Israeli authorities released 550 Palestinian prisoners. This was the second and last stage of the prisoner swap between Israel and Hamas. The exchange began in the early hours on Sunday.

The prisoners were greeted by family members and fellow Palestinians, singing, dancing and waving the Palestinian flag, at the Palestinian Authority headquarters in Ramallah.

A group of 40-odd prisoners were taken to Gaza City in a bus.

According to a Hamas spokesperson, as per the swap, Israel freed 1,027 Palestinian prisoners in return for Gilad Shalit.

Shalit, an Israeli Defense Force personnel was captured by Hamas militants in Gaza in June 2006.

In the first stage, Israel released 477 Palestinian prisoners in exchange for Shalit, on October 18, 2011.

Reports suggest that most of the released Palestinians belong to the armed wing of the Fatah movement and none from Hamas or any other Islamist terror group.

Palestinian Authority President Mahmoud Abbas addressed the gathering and praised the prisoners for their courage. He also hoped that Hamas leaders such as Ibrahim Hamad and Abdullah Barghouti would be released soon. writes that the Hamas prime minister Ismail Haniyeh emphasised on the "removal of borders" within "Palestine" arising from the prisoner exchange, stating that prisoners released were from the West Bank, Gaza, East Jerusalem and the Golan Heights.

In the first stage, Hamas is said to have picked those who had to be freed, and in the second stage, Israel decided who from the prisoners could cross over to Palestine, in a deal which was brokered by Egypt.

According to the Xinhua, of the 550 prisoners, 509 are from the West Bank under the rule of the Palestinian National Authority (PNA) and 41 are from the Gaza Strip governed by Hamas.

A Palestinian prisoner (C) is greeted upon his arrival to the West Bank city of Ramallah on Sunday.Reuters
Released prisoners wait to disembark from a bus upon their arrival to Ramallah. Israel released 550 Palestinian prisoners on Sunday.Reuters
Hamas members.Reuters
Palestinians watch the arrival of freed Palestinian prisoners at Rafah crossing in the southern Gaza Strip on Sunday.Reuters
A Palestinian jumps over a bonfire as relatives of Palestinian prisoners wait for their release.Reuters
A freed Palestinian prisoner is carried by people upon arrival at Rafah crossing in the southern Gaza Strip.Reuters