JERUSALEM — Israel released 26 Palestinian inmates, including many convicted in grisly killings, on the eve of long-stalled Mideast peace talks, angering families of those slain by the prisoners, who were welcomed as heroes in the West Bank and Gaza.

Buses carrying the inmates departed the Ayalon prison in central Israel late Tuesday, a nighttime release that was aimed at preventing the spectacle of prisoners flashing victory signs as has happened in the past. Relatives of the victims, many with their hands painted red to symbolize what they say is the blood on the hands of the inmates, held protests throughout the day, and some protesters tried briefly to block the buses from leaving.

The decision to release the men stirred anguish in Israel, where many Israelis view them as terrorists. Most of the prisoners were convicted of killings, including Israeli civilians, soldiers and suspected Palestinian collaborators, while others were involved in attempted murder or kidnapping.

Celebrations erupted in the West Bank and Gaza Strip, where thousands of Palestinian well-wishers awaited the buses' arrival. Palestinians generally view the prisoners as heroes regardless of their acts, arguing they made personal sacrifices in the struggle for independence.

Fireworks lit the sky in Gaza, where rival Hamas and Fatah supporters, including several masked gunmen, celebrated to the beat of drums. Some danced while others flashed victory signs and waved flags of the Palestinian factions. Cars with loudspeakers blasted nationalistic songs.

"Today is a day of joy and happiness. I can't wait until I hug my beloved son," said Aicha Abu Setta, the 68-year-old mother of freed prisoner Alla Abu Setta.

"I am so excited that he will be free and he will spend his first night among us after more than 20 years," she said, clutching a picture of her 43-year-old son, who was arrested in 1994, charged, along with his cousin, of killing a soldier.

Palestinians hurled rocks at the Israeli military vehicles escorting the bus convoy as it reached the crossing to the West Bank after 1 a.m.

About a thousand people took to the streets of Ramallah in celebration, singing and dancing. The released prisoners were met with hugs from well-wishers. They were greeted by Palestinian President Mahmoud Abbas personally at the presidential compound and later laid a wreath at the grave of late Palestinian President Yasser Arafat. Abbas delivered a short speech congratulating the prisoners and said he will "not rest until they are all released." There are about 4,500 Palestinians in Israeli jails. "You are just the beginning and the rest will come," Abbas said.

Tuesday's release was part of an agreement brokered by U.S. Secretary of State John Kerry to get Israel and the Palestinians back to the table for peace talks that had been paralyzed since 2008. In all, 104 convicts are to be released in four batches, although their freedom is contingent on progress in peace talks.

Israelis and Palestinians are to launch talks in Jerusalem on Wednesday, following a preparatory round two weeks ago in Washington.

Among those released Tuesday was a Palestinian convicted in the 1994 slaying of Isaac Rotenberg, a 69-year-old Holocaust survivor who was attacked with an ax as he was working at a construction site where he was a contractor. Others were convicted in the slayings of Ian Feinberg, an Israeli lawyer killed in a European aid office in Gaza in 1993, and Frederick Rosenfeld, an American slain while hiking in the West Bank in 1989.

Thousands of Palestinians have spent time in Israeli prisons since Israel's capture of the West Bank, Gaza and east Jerusalem in 1967. They were jailed on charges ranging from throwing rocks to killing civilians in bombings, shootings and other attacks.

On Monday, Israel's prison service posted the names online of the first 26 inmates to be released to allow for possible court appeals. Israel's Supreme Court rejected an appeal by families of those killed by the prisoners earlier Tuesday.

The fate of the prisoners is extremely emotional in Palestinian society. After decades of fighting Israel, many families have had a member imprisoned and the release of prisoners has been a longstanding demand.

Most of the inmates already have served around 20 years, with the longest-held arrested in 1985. Fourteen of the prisoners were released to the Gaza Strip and 12 to the West Bank.

Palestinians argue that the 104 prisoners slated for release carried out their acts at a time of conflict, before Israel and the Palestinians struck their first interim peace agreement in 1994. They say Israel should have released them long ago, as part of previous peace talks.

Earlier Tuesday, Israel angered Palestinians when it announced it was moving forward with building nearly 900 new settlement homes in east Jerusalem.

The Palestinians had refused to resume negotiations with Israel unless it halted settlement construction in territory it wants for a future state. Israel has refused, insisting that settlements and other core issues be resolved through talks.

After six trips to the region, Kerry managed to persuade Abbas to drop the settlement issue as a condition for negotiations to start. In exchange, Israel agreed to the prisoner release.

The Palestinians argue the settlements, now home to more than 500,000 Israelis, are making it increasingly difficult to carve out their state and that continued Israeli construction is a sign of bad faith.

Hanan Ashrawi, a senior Palestinian official, said Israel's settlement plans are a slap in the face of the Palestinians and Kerry. "It is not just deliberate sabotage of the talks, but really a destruction of the outcome," she said.

Ashrawi urged Kerry "to stand up to Israel" and deliver a tough response.

Mark Regev, a spokesman for Israeli Prime Minister Benjamin Netanyahu, rejected the Palestinian claim.

"The Palestinians know that Israel rejected their demands of a settlement freeze as a precondition to these talks, they cannot say otherwise," Regev said. "The construction that the Israeli government authorized is all in Jerusalem and the large blocs, in areas that will remain part of Israel in any possible final status agreement and this construction that has been authorized in no way changes the final map of peace."

Kerry said he spoke with Netanyahu Tuesday morning. "We had a very frank and open discussion on the issue of settlements," he said. "Let me make it clear. The policy of the United States with respect to all settlements is that they are illegitimate and we oppose settlements taking place anytime."

The latest construction is to take place in Gilo, an area in east Jerusalem that Israel considers to be a neighborhood of its capital. Israel's annexation of east Jerusalem, which the Palestinians claim as their capital, is not internationally recognized.

The housing plan, which received initial approval last year, would expand Gilo's boundaries further toward a Palestinian neighborhood. The plans for 900 housing units in Gilo come in addition to an earlier announcement this week of some 1,200 other settlement homes in the West Bank and east Jerusalem.