LONDON — When President Donald Trump endorsed Boris Johnson for prime minister of the United Kingdom over the weekend, it wasn't the first time he'd thrust himself into another nation's domestic political affairs.

Earlier this year, Trump rushed to recognize Israel's claim to the Golan Heights region as part of an apparent campaign to support Prime Minister Benjamin Netanyahu's re-election effort.

And ever since taking office, he's been a frequent commentator on the strengths and weaknesses of foreign leaders, sometimes using his bully pulpit to undermine them at critical junctures — as he did by poor-mouthing British Prime Minister Theresa May's "Brexit" plan last summer just as she was unveiling it.

On one level, Trump's brash lobbying in foreign countries is just another case of norm-busting for a president who often rejects the niceties of both domestic and international politics. But at a deeper level, Trump's moves help normalize a practice that helped him win in 2016 and could advance his cause as he seeks re-election in 2020.

"It certainly gives a green light to whatever country wants to get involved in our elections," Tom Nides, who served as deputy secretary of state under President Barack Obama, said in a telephone interview. "Donald Trump is really good at this — way better than any of us give him credit for."

Foreign intervention could range from an endorsement to a full-scale campaign.

In 2016, Russia undertook a sophisticated operation to aid Trump and defeat Democratic nominee Hillary Clinton. Former special counsel Robert Mueller did not find sufficient evidence to charge Trump or his aides with engaging in a conspiracy, but he did detail the ways in which the campaign and Russia played off each other to Trump's benefit.

Trump recently acknowledged the efficacy of Russia's maneuvering on his behalf, which, according to Mueller and U.S. intelligence agencies, included playing a role in the theft and publication of private emails from the Democratic National Committee and Clinton allies, as well as efforts to influence voters by sowing discord through social media.

"I had nothing to do with Russia helping me to get elected," Trump wrote in a message aimed at discrediting the validity of the investigation into whether he conspired with Russia and whether he obstructed justice after the campaign.

....say he fought back against this phony crime that didn’t exist, this horrendous false accusation, and he shouldn’t fight back, he should just sit back and take it. Could this be Obstruction? No, Mueller didn’t find Obstruction either. Presidential Harassment! — Donald J. Trump (@realDonaldTrump) May 30, 2019

He's also recently said that he would not use material stolen by a foreign country in 2020.

While there's nothing new about foreign election interference — the U.S. has been on both sides of it in the past — the U.S. code includes a number of laws designed to limit the influence of noncitizens and American officials generally have tried to avoid the perception that they are tampering overseas.

In the case of Johnson, Trump isn't just engaging in an election but in the selection of a leader within a faction — somewhat akin to a British prime minister endorsing a Democratic candidate for speaker of the House if Nancy Pelosi were to step down in the middle of the current Congress.

President Donald Trump shakes hands with British Foreign Secretary Boris Johnson at the United Nations in 2017. Kevin Lamarque / Reuters file

Julian Zelizer, a professor of history and public affairs at Princeton University, said that there are plenty of good reasons for American presidents to stay out of domestic politics in other countries, starting with the "golden rule."

"Don't do unto others what we don't like done here," he said in an email. "Also, intervening has many unintended consequences, especially if you don't have a deep sense of the history and politics of another country."

That can backfire, he added.

"By intervening, the president instantly becomes a part of the story and can make it harder for the U.S. to see its interests achieved," Zelizer said. "Finally, there are often limits to what the U.S. president can actually change, so it's not worth all the risks — especially the political risks back home."

But for Trump, the equation may be flipped on its head. Rather than avoiding reciprocation, Trump could see benefit in a situation in which Johnson takes office, exits the European Union by the end of October as promised and cuts a trade deal with the U.S. that Trump can tout on the campaign trail — perhaps with Johnson's endorsement.

If anything, Trump and his close allies have suggested that foreign intervention in domestic politics is a normal course of business.

"There’s nothing wrong with taking information from Russians," Rudy Giuliani, Trump's personal lawyer, said on CNN in April.

Last month, Giuliani aborted a planned trip to Ukraine where he was expected to push president-elect Volodymyr Zelensky to investigate the origins of Mueller's Russia probe and, separately, Democratic presidential candidate Joe Biden's son's role in an oil company.

It appeared that leaning on Ukraine to open investigations to help Trump's electoral prospects, amid the furor over the Mueller report and rising calls for Trump's impeachment among some Democrats in the House, risked enough of a political backlash in the U.S. that it wasn't worth taking the trip.

But the pattern suggests that Trump is open to accepting help where he can get it.

White House senior adviser Jared Kushner, Trump's son-in-law, who met with Russian emissaries claiming to have "dirt" on Clinton during the 2016 campaign, told Axios' Jonathan Swan that he's not sure if he would call the FBI if invited to a similar meeting in the future.

"I don't know," he said in an interview with Swan taped for HBO. "It's hard to do hypotheticals."

The rules of the road aren't perfectly clear — historically, the U.S. has been known to support opposition groups abroad politically and militarily at times — but they usually don't involve actively or tacitly encouraging a foreign adversary to engage in American elections. A corollary to that is the idea that it's not kosher for an American president to risk fraying relationships with close allies by picking favorites among their contenders for leadership positions.

Put simply, the U.S. typically doesn't want to upset its allies — or invite influence from its enemies.

"It's a matter of degrees, and it's a matter of propriety," said Michael Caputo, a veteran Republican strategist who worked on Trump's 2016 campaign and has extensive experience in Russian elections. He said the experience from the last election means that everyone "understands that international involvement in U.S. elections is a third rail — you'll fry."

But Trump's actions give some veteran foreign policy hands reason to think he won't be bound by convention.

"Donald Trump has reshuffled the deck of behavior," Nides said. "He has turned upside-down normal protocol."