As in America, Britain’s rust belt regions are turning to the right, possibly heralding a realignment in next month’s general election.

Credit...Andrew Testa for The New York Times

KIRKBY-IN-ASHFIELD, England — The red brick houses that march up a gentle rise in this worse-for-wear town have long stood as part of the “red wall” in British politics, the gritty stronghold of coal and factory towns in the Midlands and north of England that voted as reliably for the Labour Party as blue-collar precincts in the American Midwest once voted for the Democrats.

So when Natalie Fleet, the Labour candidate for Parliament, knocked on the first of those doors last week, and was told by the woman who answered, Donna Savage, that she was thinking of voting for the Conservatives in next month’s election, it was a jolting sign of how much British politics has changed.

“I want to get Brexit done,” Ms. Savage, a 43-year-old teacher and lifelong Labour voter, told Ms. Fleet, echoing a phrase frequently used by the Conservative prime minister, Boris Johnson. Plus, Ms. Savage added, “I don’t want Jeremy Corbyn to be prime minister,” referring to the leftist Labour leader, who is deeply unpopular in this part of the country.

Mr. Johnson has promised to take Britain out of the European Union swiftly, and he hopes to use that message to attract and convert fed-up Labour voters. His Conservative Party has targeted Ashfield as one of the districts it has the greatest chance of turning Tory in the election on Dec. 12.

If Mr. Johnson succeeds, it would not only give him the Parliamentary majority he needs to finally deliver Brexit, it would also amount to a breathtaking realignment of British politics.

“These Midlands seats are the equivalent of the swing states in the U.S.,” said Tim Bale, a professor of politics at Queen Mary University in London. “Where they go, the election goes.”

In Ashfield, the Labour incumbent, Gloria De Piero, hung on to her seat by just 441 votes in the last election in 2017 and opted not to run again — a decision that looks like a case of reading the writing on the wall. Mr. Johnson has already visited twice, attesting to the district’s status as a prime battleground.

Working-class voters in Ashfield have reviled the Tories ever since the free-market revolution of Prime Minister Margaret Thatcher in the 1980s, which they blame for hastening the demise of the coal industry.

But Brexit has replaced Thatcher as the defining issue, and Mr. Johnson’s promise appeals to people in this district, who voted by more than 70 percent to leave the European Union in 2016 — one of the biggest endorsements of Brexit in Britain — and have seethed over the last three and a half years as the political class has failed to carry out their wishes.

That frustration, combined with a fraying social fabric and long-term corrosion in economic opportunity, has created a volatile atmosphere in Ashfield: anti-immigrant, distrustful of the political elite and receptive to populist appeals from the right that would have been jeered a few years ago.

“What I voted for is to leave the E.U., make a clean break and then negotiate a new deal with them from a position of strength,” said Glyn Street, 57, who drives a street sweeper. “We’ve got to get out of Europe, because otherwise our kids will be under a dictatorship.”

Mr. Street is backing the Brexit Party’s candidate, Martin Daubney, a former journalist who was elected to the European Parliament in May and whose last job was editing a men’s magazine, “Loaded.” He is campaigning on a platform that Mr. Johnson’s pro-Brexit credentials are suspect and that his own party is the “last chance to save Brexit.”

To complicate matters further, there is also an ambitious district councilman, Jason Zadrozny, who is running as an independent with a pox-on-both-their-houses message about the major parties. In this bumper-car pileup of a race, rife with personal feuds and animosities, Ms. Fleet could well finish third.

“It’s like the country is turning upside down,” said Lee Anderson, 52, a Labour Party exile and onetime coal miner who is the Conservative Party’s candidate in Ashfield. “As bizarre as it seems, Boris and Donald Trump connect with working-class voters. People like plain English.”

Mr. Anderson has gone further than blunt language. Last week, he posted a video on Facebook in which he proposed to evict supposedly unruly residents from a local public-housing project and put them in tents, where they would be forced to pick potatoes and other vegetables from dawn till dusk.

Anticipating blowback, he stipulated that it was “my own personal opinion — nobody else’s.” Opponents accused him of sowing divisions and being hardhearted. But Steven Larvin, a 61-year-old greengrocer with a stall in the nearby town of Sutton, confessed sheepishly that the proposal appealed to him.

Mr. Johnson has been more cautious: On Sunday, he presented the Conservative Party’s agenda, promising Brexit, of course, and that the government would recruit 50,000 additional nurses. But otherwise it avoided the radical measures that characterized Labour’s manifesto or that of his predecessor, Theresa May, who hurt her chances in 2017 when her tough health care proposals backfired.

The Conservatives, Mr. Anderson argues, better embody the traditional values that people in Ashfield want to preserve than does Labour. Without the coal mines and factories, he said, the Labour Party no longer has a “captive audience of useful idiots” for its outmoded policies.

Mr. Anderson was himself a member of that audience. A longtime Labour activist who once ran Ms. De Piero’s district office, he defected from the party after falling out with colleagues over his vote for Brexit.

Still, Mr. Anderson does not have a good answer for how Mr. Johnson will reconcile the free-market, entrepreneurial policies that drive his Brexit campaign — one built on a vision of turning Britain into Singapore-on-Thames — with the yearning in the Midlands for a strong state and a return to the kind of traditional industrial economy that powered the country in the 1960s.

For all his workingman credibility, running as a Conservative can still be a bruising experience. Last week, as he knocked on doors in the hillside village of Jacksdale, a passing motorist rolled down his window and yelled, “Tory scum!”

“There are still some people who won’t forget — can’t forget — that the Conservatives shut the pits,” said Jon Ball, the head of content at the local newspaper, The Mansfield and Ashfield Chad. “But there are many other people who have moved on.”

The betting markets have Mr. Anderson running neck-and-neck with the independent candidate, Mr. Zadrozny. A onetime Liberal Democrat who voted in favor of Brexit, his political career almost ended after he was arrested in 2015 on charges of child sex abuse. The charges were later dropped for lack of evidence. Now, Mr. Zadrozny presents himself as a pragmatic public servant who will get things done without being tied to the orthodoxy of either major party.

At a time when politicians are in disrepute, he argues that this formula will resonate.

“People were crying out for something different, and I guess we’re a conduit for that,” Mr. Zadrozny said. “I’m offering the one thing they really want from Conservatives, which is Brexit, but without the rabid, right-wing Tory bit.”

As he shook hands in the market square, however, Mr. Zadrozny discovered the limits of being an anti-politician. Theresa Woodland, 60, a retired hairdresser, told him that however much she appreciated his work for the district, she was going to vote for the Labour Party.

“If I vote for you, I think Boris will get in,” she told him. “If Labour gets in, I think Ashfield will benefit.”

That is the kind of loyalty Ms. Fleet is counting on to avoiding being swallowed up by the political earthquake rolling across Britain. A onetime single mother who had a child at 16, Ms. Fleet promotes her credentials as a product of Ashfield, in all of its hardship and heartbreak. She speaks movingly about her sick grandmother, languishing in a hospital without proper care.

But Ms. Fleet acknowledges that Brexit is the overriding issue, and Labour’s policy on it strikes many as hopelessly muddled: The party says it would negotiate a new withdrawal agreement with the European Union and then put that to a second referendum — a multi-step process that leaves people in Ashfield pulling out their hair.

“I want to get it done — get it sorted — so we can go back to discussing bread-and-butter issues that people really care about,” said Ms. Fleet, who works as a union official and canvassed for Hillary Clinton in Ohio in 2016.

For Ms. Fleet, however, the biggest threats in this campaign are personal. Last week, the windows of her campaign office were smashed by an unknown assailant wielding a hammer. She has been vilified on social media by pro- and anti-Brexit extremists, much as Ms. De Piero was during her last three years in Parliament. That vitriol, Ms. De Piero said, contributed to her decision not to run again.

Ms. De Piero, a former television journalist, often accompanies Ms. Fleet on her door-knocking rounds. She takes comfort that she rarely encounters the same rage face-to-face that she gets on Facebook and Twitter. But with passions running high and the sun setting at 4 p.m. in the weeks leading up to this rare pre-Christmas election, there is safety in numbers when approaching a darkened doorway.

“You’ve just been called a traitor, and you think about that every time before you go door-knocking,” Ms. De Piero said. “If they talk this way to me on social media, why wouldn’t they talk this way at their door?”

Anna Schaverien contributed reporting from London.