Like many cities around Britain shaken by anti-immigrant riots over the past week, Hartlepool, a seaside town on the northeast coast, has partly recovered from the devastating waves of industrial decline that began washing over the country in the 1980s.
Still, the scars linger. Disposable income is below the national average, and more people are out of the work force, according to the Office for National Statistics. There are fewer active businesses, healthy life expectancy is lower and the crime rate is 89 percent higher.
In Britain, as well as throughout Europe and in the United States, economic problems — like stagnant wages, roaring inequality and declining public services — have been linked to the rise of anti-immigrant attitudes.
Even though research shows that immigration is an overall plus for most economies, far-right politicians have been able to exploit those frustrations to energize supporters and gain political power.
In Britain, Nigel Farage, the leader of the populist, anti-immigration party Reform, has regularly made false claims that refugees and migrants drained public budgets. He has complained, for instance, about Britain having to “build a house every two minutes” to accommodate legal migrants and warned of “those arriving on the back of lorries” trying to get benefits.
Mr. Farage, who was elected to Parliament in July, added to the web of disinformation that helped kindle the riots by inaccurately suggesting the man who fatally stabbed three young children at a dance class in Southport was an undocumented immigrant. He later came out against the violence.
Falsifying or distorting the threat of immigrants to public safety often follows warnings about the threat to livelihoods.
During his first presidential campaign, Donald J. Trump’s frequent railings about immigrants stealing jobs from Americans were combined with the warning that Mexicans crossing the border were “rapists” or bringing drugs and crimes. He is reprising that message for his current run for the White House.
For far-right rioters in economically challenged areas of Britain, immigration was a convenient and misguided target for violence.
“I was here,” said Nancy Pout, manager of the Salaam Community Center in Hartlepool, recalling last week’s riot.
Demonstrators in Hartlepool who hurled bricks through shop windows, set police cars on fire and beat up people passing by were not protesting against the lack of a job or a long wait for a doctor, she said.
“There was violence for violence’s sake,” she said.
Ms. Pout, 37, grew up during some of the city’s toughest years, when it had the highest unemployment rate in England, and she works with people who are struggling with the fallout that accompanies economic deprivation.
“No one had the same reason for why they were there when asked,” she said of the rioters, and “the reasons changed repeatedly.”
Immigration has brought benefits to Britain, which has been experiencing a severe labor shortage that has left more than a million vacant jobs. Migrants are more likely to be employed and contributing to public finances, research has found. And workers from Asia, Africa and the Middle East also staff critical positions at hospitals and nursing homes and pay tuition at British universities.
Those aggregate gains do not mean there are not losers. Depending on someone’s location and skills, an influx of immigrants can make it tougher to find a job at a desired wage, said Rob McNeil, deputy director of the Migration Observatory at the University of Oxford.
Even so, Mr. McNeil said, the idea that the riots are motivated by specific economic grievances does not match up with what happened on Britain’s streets.
Rather, he said, the polarizing issue of migration is being used for political reasons. It is misleading to “characterize the things that are going on at the moment as protests about real issues as opposed to a broad expression of rage toward the generalized issue of migration and migrants,” he said.
What is interesting is that negative attitudes toward migrants overall have been declining at a sharp rate in Britain since 2016, when the country voted to leave the European Union, a move propelled in part by the desire to regain control over its borders.
And despite rumors of renewed violence, antiracism protesters far outnumbered the anti-immigrant voices in many cities on Wednesday night.
Britain’s economic problems, of course, are real. Decades of slow growth, laggard productivity and deep budget cuts have hollowed out the health care system, postponed upkeep on roads, schools and technology, created court backlogs and trimmed social services. Dissatisfaction with public services in Britain is soaring.
In June, the waiting list for National Health Service treatment in England reached 7.6 million cases. The number of people receiving long-term care fell, even though the demand for such services has risen by 10 percent in the past seven years.
Sanne Van Oosten, a social scientist at the University of Oxford, said research showed when public services decline, people blame immigrants — even if they have nothing to do with the falloff.
Researchers in Italy looked at how a policy change reduced access to public services in some small municipalities. In places where local police, public registries and garbage collection were cut, concerns about immigration rose. At the same time, far-right parties stepped up their campaign about the link between service reductions and immigration.
A decline in public service, the study found, “prompts citizens to believe they are not receiving ‘their fair share of public resources’ and that ‘political elites do not care about their communities’ which makes affected communities more susceptible to the messages of far-right parties.”
As Ms. Van Oosten said: “People think if more immigrants come in, I’m losing something.”
That theme could be heard in Sunderland, a port town about 22 miles north of Hartlepool, which was one of more than a dozen cities hit by violence. Mobs attacked police, looted stores and burned buildings. Labour Party candidates won the parliamentary districts that cover Sunderland in last month’s national election, while Mr. Farage’s Reform party came in second.
The Rev. Clare MacLaren of Sunderland Minster, the city’s Anglican cathedral, said cuts in public benefits gave extremists an opening.
“They encourage people to point the finger,” she said. “They encourage people to think: ‘All the resources are going to these newcomers.’ That’s where the resentment is coming from.”
Amelia Nierenberg contributed reporting from Sunderland, England.