LONDON — Donald Trump just can’t seem to stay away from British politics. He’s fired off comments on topics including Brexit, his low opinion of a British ambassador, and how his Trump-branded golf course in Scotland “furthers U.K. relations.”

So there’s little surprise that the American president is playing an outsize role in Britain’s upcoming elections — for good or bad, depending.

In Britain, more than any other country aside from the United States, Trump has sought to bolster his political allies and trash his detractors.

In so doing, he has blithely crossed traditional red lines. In late October, Trump phoned in to a talk radio show hosted by a friend, Brexit Party leader Nigel Farage, to dump on leftist Labour Party head Jeremy Corbyn.

“So bad for your country, so bad. He’d take you in such a bad way,” Trump said of Corbyn. “He’d take you into such bad places.”

British officials have been taken aback by such overt election interference by a close ally.

But in an act of political jujitsu, Corbyn embraced the fight, tweeting out Trump’s harsh remarks as he sought to weaponize the U.S. president’s deep unpopularity among Britons for his own aims.

Now, with the Dec. 12 election just days away, Trump was here again.

The president was in London this week for a NATO summit — complete with a reception at Buckingham Palace with Queen Elizabeth II.

At his rallies, Corbyn asserts that Trump has formed a dark alliance with Johnson — intended, among other claims, to procure the sale of Britain’s beloved National Health Service to U.S. pharmaceutical companies.

To critics such as Corbyn, Trump is offering a devil’s bargain, dangling a post-Brexit free-trade agreement under which British supermarket shelves would be stocked with “chlorinated chickens” and hormone-injected beef from America — products that are banned under the more stringent food safety rules of the European Union.

Prime Minister Boris Johnson last week tried to diplomatically dissuade the American president from offering his opinions on domestic affairs. “What we don’t do traditionally as loving allies and friends, what we don’t do traditionally, is get involved in each other’s election campaigns,” Johnson told LBC radio.

On previous visits to Britain, Trump has been greeted with massive protests, complete with a blimp depicting him as a diaper-clad baby throwing a tantrum.

The “shadow of Trump looms large” in the election, said Jonathan Tonge, a professor of politics at the University of Liverpool.

Patrick Dunleavy, a political science professor at the London School of Economics, said, “Of course Labour would love to run against Boris as Trump.”

Dunleavy said, “It’s a solid card to play.”

But, he said, Johnson was seeking to keep Trump at arm’s length. “It doesn’t win him any votes,” Dunleavy said.

In July 2018, on the eve of Trump’s first official visit to Britain, he told the Sun tabloid that then-Prime Minister Theresa May had foolishly ignored his negotiating advice and potentially jeopardized any future trade deals with the United States.

“I actually told Theresa May how to do it, but she didn’t listen to me,” Trump said.

At a news conference afterward, Trump said he had been misquoted. The reporter released a transcript as proof.

In a break from the protocol governing the “special relationship” with Britain, Trump publicly denounced one of the country’s top diplomats.

In July, Sir Kim Darroch resigned as the British ambassador to Washington after leaked diplomatic communications quoted him calling Trump “insecure” and his early administration “dysfunctional” as he worried aloud that Trump might be in debt to “dodgy Russians.”

Trump slapped back, calling Darroch a “pompous fool,” and declared him unwelcome at the White House.

In July, Trump praised Johnson after he became prime minister, saying, “They call him ‘Britain’s Trump,’ and people are saying that’s a good thing.”

Trump said: “They like me over there. That’s what they wanted. That’s what they need.”

But Trump is decidedly disliked in Britain.

Opinion surveys reveal deep negatives here, with Trump scoring worse than Russian President Vladimir Putin.

In one recent poll by YouGov, voters were asked whether an endorsement from Trump would help or hurt a candidate in Britain’s election. Just 10 percent called it helpful, and more than half said it would hurt.

Since becoming prime minister, Johnson’s unconventional approach — including attempting to suspend Parliament for a month and holding a news conference against a backdrop of police cadets — has drawn comparisons to America’s own norm-busting president.

Chuka Umunna, a senior figure among the Liberal Democrats, recently accused Johnson of “following the Trump playbook” with his populist, right-wing politics.

Last week, Corbyn announced he had “secret” documents that proved the NHS would be “up for sale” in a future trade deal with the Trump administration.

At a news conference, Corbyn dramatically flipped through 451 pages of unredacted documents that he said covered six rounds of trade talks between the two sides.

The documents covered a range of issues, including agriculture, food labeling and health care.

The Labour leader claims that the price of medicines would rise under any possible trade deal struck between Johnson and Trump and that the United States would insist on extending patent protections for American drugs.

Commentators have noted that these “secret” documents weren’t so secret, that Britain has openly sought early trade talks with the United States and that so far they’ve only been talks about talks — and that Britain hasn’t agreed to any U.S. demands.

“There will be no sale of the NHS, no privatization,” Johnson promised. “The NHS is not on the table in any way.” The prime minister said he would “walk out” of trade talks with the United States if it was a precondition that Britain’s universal care system were part of discussions.

His Conservative Party has tried to steer the election conversation toward Brexit, believing it has a strong message with its “get Brexit done” slogan.

During a news conference in London in June, when asked whether the NHS would be involved in a possible trade deal with the United States, Trump said “everything” was on the table.

Trump has since backtracked, possibly aware of what a hot-button issue this is in Britain. In his phone-in with Farage, Trump said, “It’s not for us to have anything to do with your health-care system.”

Trump has complained about “freeloading” countries that buy U.S.-developed drugs at lower costs because their government-run health services have greater bargaining power.

“It is unacceptable that Americans pay vastly more than people in other countries for the exact same drugs,” he said in his State of the Union address in February.

The massive NHS is among Britain’s most cherished government institutions. Introduced by a Labour government after World War II, it is one of the largest employers in the world. Its rules around drug pricing are set by an independent body called NICE — the National Institute for Health and Care Excellence. Because of its size, the NHS can negotiate prices below market rates.

Some are worried that in a post-Brexit trade deal, the United States will insist on prices set by its free market, not an independent body.

Steven Fielding, a professor of political history at the University of Nottingham, said opposition politicians are linking the NHS and Trump in a way that fires up their base.

“Labour is saying that one of the most beloved institutions is being threatened by the most hated figure on the public stage at the moment,” Fielding said. “It’s very clever.”