WASHINGTON >> When Finland wanted to join NATO to ward off Russian aggression, it knew it had a friend living in the White House and could count on President Joe Biden’s support. But to ensure that the U.S. Senate would ratify its membership bid, Finland’s government decided to also seek out the president living in Florida.

And so Mikko Hautala, the Finnish ambassador to the United States at the time, made a point of speaking privately with former President Donald Trump to persuade him of the merits of his country joining the alliance. The goal was to head off any opposition by Trump, who has long been openly hostile toward NATO.

The strategy worked. Trump, who potentially could have ignited Republican opposition with a single intemperate social media post, remained publicly silent, and the Senate voted 95-1 to approve Finland’s admission to the alliance in August 2022. Had Trump spoken out against the move, it would have taken only 34 votes to block the two-thirds supermajority needed for ratification.

In the nearly four years since he left the White House, Trump has acted as something of a shadow president operating out of what he used to call the Winter White House at his Mar-a-Lago estate in Florida. Even before he kicked off a comeback bid to reclaim his old office, foreign governments realized that Trump was still a force in American politics and that they needed to take him into account in their dealings with the United States.

Now that he is the Republican nominee for president in next month’s election, foreign leaders have been playing up to Trump even more. A parade of world leaders has made the pilgrimage to Mar-a-Lago or to Trump Tower in New York, including the leaders of Ukraine, Israel, Poland, Hungary, Argentina, Qatar, the United Arab Emirates and other countries. The crown prince of Saudi Arabia rang up Trump’s cellphone while the former president was on the golf course. The newly elected prime minister of Britain dropped by last month for dinner.

“Very unusual for a former president,” said Jeremy Shapiro, a former State Department official who is now director of the U.S. program at the European Council on Foreign Relations. “I suppose it comes from his status as both a former and possibly future president, which is of course unique.”

“As a former president, he has the contacts and the relationships,” Shapiro added. “As a possible future president, he has the potential power to deliver for foreign leaders.”

The complicated diplomacy of dual and dueling presidents was reinforced by a new book by journalist Bob Woodward to be published by Simon & Schuster on Tuesday. The book, “War,” reports that an unnamed aide to Trump told Woodward that the former president since leaving office has spoken on multiple occasions with President Vladimir Putin of Russia, perhaps as many as seven times.

Trump and the Kremlin have disputed the report and 20 current and former Biden and Trump administration officials and intelligence officials have told The New York Times that they could not confirm it. But several veteran U.S. officials said it was possible the two could have spoken without American intelligence agencies detecting the calls.

Many former presidents maintain contacts with foreign leaders after leaving the White House. Richard Nixon regularly traveled the world as an elder statesman meeting with heads of state, while Jimmy Carter established himself as a sort of globe-trotting troubleshooter in conflict zones or election monitor in fragile democracies. Bill Clinton, George W. Bush and Barack Obama often see overseas counterparts during their travels, at conferences or through charitable initiatives.

For the most part, those presidents were not seen as enduring power brokers back in the United States in the same way that Trump is, and they have generally operated within certain parameters, typically coordinating with the White House or State Department. Carter at times went beyond what the sitting president of the time wanted, for instance in negotiating with North Korea or urging United Nations members to oppose the Iraq War. But even then, foreign leaders did not regard him as a quasi-president or president-in-waiting.

John Bolton, a former national security adviser to Trump who has become a vocal critic, recalled how former Secretary of State Henry Kissinger used to joke that foreign leaders typically wanted to meet with him when they visited the United States because he was a stop on the museum tour.

“They wanted to hear what Henry Kissinger had to say, they wanted to hear what Richard Nixon had to say,” Bolton said. “That’s not what they’re calling Donald Trump for. They want to try to get him to weigh in on the side they want to prevail or at least mitigate the downside if he came out the other way.”

“Trump ran his White House like a Middle East dictatorship, so these actions are par for the course with him,” said Brian Katulis, a senior fellow at the Middle East Institute. “But it’s off-the-charts unusual and potentially a major national security threat for a number of reasons.”

Secret conversations in the middle of a war with the leader of a sanctioned U.S. adversary like Putin would go beyond grip-and-grin photo ops at Mar-a-Lago, particularly because Trump has played an important role on the issue of aid to Ukraine in its war against Russian invaders.

Trump has said that Putin’s full-scale invasion of Ukraine in 2022 was “very smart” and refused to say he hoped Ukraine would win. Instead, for months, he made clear to congressional Republicans that he opposed further military assistance to Ukraine and House Speaker Mike Johnson blocked Biden’s aid package for many months.

This “was a source of great frustration to other countries seeking to strengthen the Ukrainian resistance,” said Peter Westmacott, a former British ambassador to the United States. Trump was lobbied by competing world leaders. In March, he hosted Prime Minister Viktor Orban of Hungary, a skeptic of helping Ukraine. Then in April, David Cameron, the foreign secretary of Britain at the time, traveled to Mar-a-Lago and a week later President Andrzej Duda of Poland met with Trump in New York, both to implore the former president to release his effective hold on the Ukrainian aid.

Days later, with Johnson finally putting the measure on the floor, Congress passed $60.8 billion in aid to Ukraine in both chambers on strong bipartisan votes, although a majority of Republicans still voted against it in the House.

The dispute left President Volodymyr Zelenskyy of Ukraine in an awkward position. A senior official in his government said that Zelenskyy had avoided any “back-channeling or gamesmanship” with Trump and sought to deal with him only through formal channels.

Zelenskyy understands that he needs to maintain bipartisan support, and he will work with whoever wins the election, the official said. Nonetheless, he found himself caught in the American political crossfire when he accompanied Gov. Josh Shapiro, a Democrat and supporter of Vice President Kamala Harris, on a visit to an ammunition factory in Pennsylvania last week to thank Americans for military hardware. Johnson blasted Zelenskyy and demanded he recall his ambassador.