The two neighborhoods — one mostly Roman Catholic, the other mostly Protestant — have been divided for generations, split by the religious and political lines in Northern Ireland that fueled the decades-long conflict known as the Troubles and, even with 25 years of a peace deal, have not fully gone away.

But last week, on Good Friday, the residents took part in a gesture of unity that would have been unthinkable a generation ago: They joined hands to create a human chain stretching across their two neighborhoods.

As Northern Ireland celebrates the 25th anniversary of the peace deal, known as the Good Friday Agreement, the display in West Belfast was a signal not just of the progress that has been made, but also of how the two communities have a surprising amount in common, especially nowadays.

On Tuesday, President Biden touched down in Northern Ireland for a visit to honor the anniversary of the agreement and to meet the leaders of Northern Ireland’s five political parties. Next week, Prime Minister Rishi Sunak of Britain, King Charles III and former President Bill Clinton, who helped broker the agreement when he was in office, will also visit Belfast to celebrate.

Yet, for all the headway that has been made since the Good Friday Agreement, prosperity has not always followed the peace, as the two neighborhoods in West Belfast can attest. They are among the most deprived in Northern Ireland, plagued by educational underachievement and child poverty, problems that have only worsened with the recent rise in the cost of living.

“Where do we get our next dime from to put in for electric?” said Demi Griffith, who lives in the mostly Protestant Shankill Road area of West Belfast, repeating a common refrain. “It’s scary.”

To top it off, Northern Ireland has not had a functioning government — the body known as Stormont — in months because of a bitter political dispute over post-Brexit trade rules. That has left poorer neighborhoods on both sides of the sectarian divide with little sense of when their economic frustrations will even be addressed.

“There are no boundaries to poverty in terms of what we are seeing here,” said Paul Doherty, the founder and community response manager of Foodstock, a charity that provides aid to families across Belfast. Twenty-five years on from “the Good Friday Agreement,” he added, “the lack of opportunities here is a real issue that we still haven’t tackled.”

Part of the peace deal included a power-sharing arrangement intended to ensure representation for the two major sides in the conflict. But the political stagnation means that any overhauls to health care or education have ground to a halt, and approvals for additional public funding for some social services have had to wait.

“It creates a vacuum,” said Robert Savage, a professor at Boston College and expert in Irish history. “Without a local government, there’s instability,” he added. “And that instability can lead to violence.”

For generations, Northern Ireland has been torn by a deep-seated divide between mostly Catholic nationalists, who want unity with the Republic of Ireland, and mostly Protestant unionists, who want the territory to remain part of the United Kingdom.

On one side of the peace wall in West Belfast, murals display Ireland’s orange, green and white tricolor flag, while on the other, the red, white and blue of the Union Jack appears, offering a stark visual reminder of the entrenched divisions.

Professor Savage said that many in deprived communities had a real sense that the transformative opportunities presented by the end of the Troubles had failed to materialize.

“There are so many people that are really grateful for the Good Friday Agreement,” he said. “But my sense is that in working-class areas that are both Catholic and Protestant, there is a real sense of disillusionment.”

There are efforts to build on the work that has been done in the wake of the peace agreement. Schools, while still largely divided along religious lines, have engaged in extracurricular programs across communities. Sports teams have sprung up recruiting players from across the lines. And an influx of international workers has brought more diversity to Belfast.

Although tensions have occasionally flared in Northern Ireland recently, largely because of the squabbling over the Brexit arrangements, there has been relative calm around the anniversary of the agreement, despite warnings from the authorities about the potential for sectarian violence.

In one outbreak, a Molotov cocktail was thrown at a police vehicle in the city of Derry, about 75 miles northwest of Belfast, during a parade on Monday held by so-called dissident republicans, who espouse an extreme version of Irish nationalism.

Sectarian violence in the wake of Brexit — which set off a fierce debate about how North Ireland would be treated after the United Kingdom’s separation from the European Union — has erupted sporadically in Belfast neighborhoods in recent years, including a riot in West Belfast in April 2021.

At that time, youth workers were out in the streets attempting to calm tensions, said Mr. Doherty, the Foodstock founder. But now, he noted, funding for many programs for young people has been cut.

“People in our communities are struggling to put food on their tables, to heat their homes,” he added. “But these vital services in terms of how we move forward here and how we are able to talk to our young people, allow them to make the right choices, those have been removed, also.”

Like Ms. Griffith, Lynsey McKinney lives in the mostly Protestant Shankill Road area. They both say they have seen a major evolution in their neighborhood in recent years.

But Ms. McKinney acknowledges that the communities live largely separately. She recalled how two years ago, her eldest daughter had turned to her and asked, “How do I know if I am in a Protestant or a Catholic area?”

“And the only way I could describe it is to look for the flags,” she said. She told her: “If you see a Union Jack, you are safe. If you see a tricolor, do not go into that area. And she was 15, and I had to start telling her the history.”

Ms. Griffith also says that she worries about her children’s safety and that she doesn’t have an especially positive outlook on the future. But the more immediate concern for both is the high cost of living.

Lisa Lynn, 42, a community worker, also grew up in West Belfast — but in the mainly Catholic Falls Road area. She remembers gunmen opening fire on a nearby police station.

“I’ve seen a massive change in terms of safety now,” she said, noting the absence of paramilitaries on the streets, for one thing. “It’s very much a progressive society, in my opinion.”

But she also said that the systems — youth programs, access to education, social services and the like — that had lifted up the community could be under threat without a functioning government.

“At the end of the day, we all have the same problems if you are orange or green,” she said, referring to the colors associated with unionists and nationalists. “Everybody is suffering financially; everyone is suffering at the hands of the politicians and the system.”

In that, she said, on either side of the sectarian divide, “their problems are no different to ours.”