Israel has freed 26 Palestinian prisoners, the second of four batches released as part of a deal that set in motion the current Israeli-Palestinian talks.

Jubilant celebrations kicked off on Wednesday morning in the occupied West Bank and the Gaza Strip, where the prisoners are seen as heroes who fought for independence, and were received by their families and Palestinian leaders.

"We greet and welcome our brothers, and we confirm that they will return to their homes and nowhere else," Mahmoud Abbas, the president of the Palestinian Authority, said in a speech to a roaring crowd in the West Bank city of Ramallah.

"Today we talk about the 104 prisoners, and our journey will not be completed until all the rest of the prisoners are released," he said. "There will be no agreement while there is still a prisoner who remains behind bars."

Wednesday's release was part of an agreement brokered by US Secretary of State John Kerry that brought Israel and the Palestinians back to the table for talks that had been paralyzed since 2008.

In all, 104 Palestinians are to be released in four batches over the coming months.

In the West Bank and Gaza, hundreds of relatives and well-wishers welcomed those freed home. Many have spent more than 20 years in prison.

Throngs of people rushed toward the prisoners as they were freed, hoisting them on their shoulders, waving Palestinian flags and dancing to music.

In Gaza, where five of the prisoners were released, relatives held signs that read "we will never forget our heroes".

"Today is a day of joy for the family and for all of Palestine," said Tayser Shubair, waiting earlier for his brother's release in Gaza.

His brother Hazem was jailed in 1994 for the death of an Israeli, according to the Israeli prison service.

"My brother is a freedom fighter and we are proud of him and we thank the president for his effort to get him out."

Thousands of Palestinians have been held in Israeli prisons since Israel's occupation of the West Bank, Gaza and East Jerusalem in the 1967 war. Many have been jailed on charges ranging from throwing rocks to killing Israelis in bombings and gun attacks.

Source: Al Jazeera and agencies