WE KNOW that US President Donald Trump loves strongmen. He was famously soft on Vladimir Putin’s Russia; he welcomed Hungary’s xenophobic Viktor Orban to Washington by saying he had done “the right thing” by restricting immigration; and he said he got along better with world leaders “the tougher and meaner they are,” singling out Turkish President Recep Tayyip Erdogan as the toughest and meanest.

And the strongmen loved him back. Orban wrote an op-ed during the election campaign hoping Trump would defeat the Democrats, whom he called “moral imperialists.” Brazil’s Jair Bolsonaro said he hoped “from the heart” that Trump would be re-elected; and Slovenia’s Janez Jansa used various conspiracy theories to justify a call congratulating Trump on winning re-election.

Perhaps it isn’t surprising that populist, right-wing strongmen get along well with each other. But their camaraderie provides yet more evidence of how these supposedly nationalist leaders place their own interests above those of their nations.

In the coming weeks, many are going to have to back away awkwardly from their embrace of Trump. Israel’s Benjamin Netanyahu began even before the election, smoothly avoiding Trump’s attempt to get him to criticize his Democratic opponent Joe Biden on a phone call. And then, in what one Israeli journalist called “Netanyahu’s two-tweet solution,” he both welcomed Biden’s victory and thanked Trump for his support of Israel.

India’s Narendra Modi has set himself a more difficult task. Modi and Trump held a joint rally in Houston last year, at which the Indian prime minister approvingly quoted a variation of one of his own campaign slogans — “Ab ki baar, Trump sarkaar,” or “Next time, a Trump government” — in what many observers saw as an explicit endorsement of the president.

The Indian ambassador in Washington — now back in New Delhi as India’s top diplomat — met Steve Bannon and described him in a now-deleted tweet as a “warrior for Dharma.” Stung by criticism from Democratic legislator Pramila Jayapal, the Indian foreign minister canceled a meeting with members of the US Congress. And the general secretary of Modi’s political party warned Democrats, after a tweet from Sen. Bernie Sanders critical of Trump’s tacit approval of anti-Muslim riots in Delhi, that his party was now “compelled” to “play a role in the US presidential elections.”

None of this made much sense at the time; now it looks incredibly short-sighted. Like their counterparts in similarly placed countries, Indian leaders are reduced to hoping that Biden won’t make the same mistakes they did — in other words, that his administration will look beyond who’s in power at the moment and focus on long-term ties.

Officials in New Delhi are feverishly reminding themselves and anyone else who will listen that Biden was one of India’s strongest backers on Capitol Hill, that he had nice words for the country even when it was the subject of international condemnation following its nuclear tests in 1998 and that he was one of the leaders of the bipartisan charge to normalize strategic relations between the two countries through an agreement on nuclear energy in the 2000s.

Other nations led by impulsive populists are also being forced to praise a bygone era of bipartisan diplomacy. Brazil’s Foreign Minister Ernesto Araujo told Bloomberg News that warming ties “happened between Brazil and the US, not between two presidents.” UK Prime Minister Boris Johnson spoke of the “shared priorities” of his country and the US.

But you would struggle to find anyone in these capitals who would disagree that their leaders’ impetuousness over the past few years won’t be a hurdle in the next four.

And this time they’ll be dealing with Biden, a man likely to take the pragmatic, long view — even with Johnson, who upset both Biden and Sen. Kamala Harris with his borderline-racist remarks about Barack Obama some years ago. Suppose it had been Sanders? Suppose the progressive wing of the Democratic Party has the next chance at government? Is it wise for any ally or friend of the US to infuriate potential American leaders to this degree?

That’s the problem with the new breed of nationalists. They aren’t actually interested in the national interest at all. Without exception, they evaluate actions in terms of whether they offer immediate political benefits or, more often, a momentary ego boost.

It’s all very well to talk of the benefits of “personal diplomacy.” Most of the time, it’s just one strongman desperately seeking validation from another. This is no way to build deep, strategic partnerships.