They were greeted with fireworks, flags, cheers, tears and victory signs. Thousands of Palestinians turned out in the West Bank and Gaza in the early hours of Wednesday morning to welcome home 26 long-term prisoners released from Israeli jails hours before the first substantive Israeli-Palestinian peace talks for five years were due to begin.

President Mahmoud Abbas met each of the 11 men who returned to the West Bank with a handshake and a kiss on each cheek outside the presidential compound in Ramallah.

"We congratulate ourselves and our families for our brothers who left the darkness of the prisons for the light of the sun of freedom. We say to them and to you that the remainder are on their way, these are just the first," Abbas told the crowd.

After the welcome ceremony the prisoners left for homes that most had not seen for more than 20 years.

All the freed men – the first group of a total of 104 long-term prisoners to be released over the next nine months – were convicted of murder or accessory to murder. Many of their victims' relatives had opposed the release in anguished protests and vigils in Israel, saying the price of re-entering peace negotiations was too high.

A last-minute petition by family members to halt the release was rejected by Israel's high court on Tuesday. "Our hearts are with the bereaved families, whose pain is immense," chief justice Asher Grunis wrote in the court's decision. "But we are certain that the authorised officials made their decision with a heavy heart, taking the families' position into account."

For Abbas the release was a tangible success after years of pressing for freedom for prisoners jailed before the Oslo accords were signed in 1993. It was also aimed at warming sceptical Palestinian public opinion towards the resumption of talks.

In Gaza thousands of Palestinians went to the Erez crossing to welcome 15 freed prisoners with dancing and chanting. Hours after the men's return to the tiny coastal territory the Israeli air force struck targets in Gaza in response to a rocket fired earlier.

Hamas welcomed the release of prisoners but insisted Palestinian liberation would come through resistance rather than negotiations. "The path to freedom is the path of victories and sacrifices, not concessions of the Palestinian people's principles, rights and honour," Mahmoud Zahar told a press conference in Gaza on Sunday.

Among the prisoners released to the West Bank were cousins Mohammed and Hosni Sawalha, who were teenagers when they boarded an Israeli bus in 1990 and attacked its passengers with knives, killing one and injuring several more. After 23 years in jail they returned home as men on the cusp of middle age, greeted by flags, bunting, fireworks and more than 40 nephews and nieces they had never met.

In the small village of Azmout, in the northern West Bank, calves and lambs had been slaughtered for a celebration expected to last at least two weeks. Mohammed Sawalha's parents, now in their 70s, had dressed in their finest clothes to meet their son; Hosni Sawalha's parents died while he was in prison. Around 100 villagers went to Ramallah to greet the released men.

"Even though I am an old woman, I will jump for joy when I see him," said Aziya Sawalha, as a stream of visitors arrived at the family home in the hours before the release to offer congratulations and accept sweets and soft drinks. Gesturing to her traditional white robe, she added: "This is more important than a wedding."

Although Aziya had regularly made the 18-hour round trip from Azmout to Ramon prison in the south of Israel for fortnightly 45-minute visits conducted through a thick glass window, she was longing to hug and kiss her son. She also welcomed the wider context of Mohammed's release: "I do believe that this time there will be peace," she said, referring to the talks due to open on Wednesday.

Yusef Sawalha, one of Mohammed's five brothers, echoed his mother's optimism. "We are happy to be going back to negotiations. We hope this will lead to the release of all prisoners and establish a just and everlasting peace for everyone," he said.

His brother's crime was committed in a period before peace seemed possible, he added. "Then these boys were defending our land and our dignity. Palestinians were also being killed left and right. Now there is no need for violence. We just hope for a normal life, and that the Israelis will leave our land, and people can live peacefully and happily."

Mohammed's uncle, Himi Sawalha, said his nephews had been "children of the first intifada [the Palestinian uprising against the Israeli occupation, which began in 1987]. You have to look at what pushed them to commit an act like this. Our lands were being taken by settlers, we were subject to harassment and oppression. This creates a mentality."

On the other side of the gulf that separates Israelis and Palestinians, Gila Molcho had a different perspective. Her brother, Ian Feinberg, was killed in Gaza in 1993 in a gruesome attack by a guard of the building in which he worked as a lawyer on an EU-funded aid project. A Palestinian convicted of being an accessory to the murder was released in this week's deal.

"I think of my brother every morning when I wake up," said Molcho, a doctor whose family come from Haifa. "He was slaughtered days after his 30th birthday and left behind three beautiful children. He believed in helping people, maybe very naively." His killer had known him and spoken to him every day, she added.

The Palestinians' insistence on the prisoners' release before returning to talks was wrong. "Their first demand is to let out murderers who are idolised by children – how is that going to help peace? I want peace but I do not want to pay this price as a gesture."

Meanwhile a senior Palestinian official warned that peace talks could collapse because of continuing settlement expansion, after Israel announced on Tuesday that more than 900 new homes would be built in Gilo, a settlement across the pre-1967 Green Line in Jerusalem.

"Settlement expansion goes against the US administration's pledges and threatens to cause the negotiations' collapse," said Yasser Abed Rabbo. "It threatens to make talks fail even before they've started."

But the US secretary of state, John Kerry, said the settlement plans were "to some degree expected", amid suggestions that the construction was a quid pro quo for the prisoners' release. "We have known that there was going to be a continuation of some building in certain places and I think the Palestinians understand that," he said on a trip to Bogota.

The Gilo homes were in addition to 1,200 housing units in the West Bank and East Jerusalem approved on Sunday. All settlements in the West Bank and East Jerusalem are illegal under international law.

Additional reporting by Hazem Balousha in Gaza