Remember when U.S. presidents were called the “leader of the free world”?

That phrase became something of a Cold War relic after the Soviet Union collapsed. But it has new relevance now that Russia is trying to undermine Western democracies and institutions.

Today, the term free world refers to the community of nations committed to democratic values of pluralism and tolerance, in contrast to the authoritarian model being promoted by Moscow and Beijing as a better political option.

Yet President Trump shows no interest in donning the mantle that previous GOP presidents embraced. He appears much more comfortable in the company of dictators, autocrats and potentates — in other words, the big boys he thinks can get things done without the messiness of checks and balances or a free press.

The president made his preferences clear during his recent trip to the Mideast and Europe, which he called “a great success for America.” He lavished praised on the autocrats of the Arab Gulf but dissed the democracies of the European Union. He refused to say a bad word about Vladimir Putin, but cold-shouldered German Chancellor Angela Merkel and other elected European leaders.

The idea of membership (let alone leadership) in the club of democracies clearly leaves Donald Trump cold.

The president’s adulation for autocrats is disturbing on multiple levels. It’s not just his indifference to democratic norms that is shocking. More dangerous, he fails to grasp the need for democracies to stand together at a time when Moscow threatens their interests and Beijing is expanding its reach.

The future costs of Trump’s bromance with strongmen were already visible on his maiden foreign voyage. In Saudi Arabia, he reveled in being treated like royalty, as Saudi princes huddled over arms sales with Prince Jared Kushner.

Gulled by flattery and dollar signs, Trump never pressed the Saudis about the negative impact of their harsh, intolerant brand of Islam that they promote worldwide that feeds the fires of violent jihad. His obsession with money and power left him blind to the role of values in fighting those that wish America harm.

Things got even uglier in Europe. Again, Trump’s main concern was money, not the values that we and most Europeans share.

He railed against NATO members for failing to spend enough on defense (getting numbers wildly wrong). He castigated Merkel on trade (in terms that prove he doesn’t grasp that issue either).

Demonstrating his true colors, he told the Belgian prime minister he had mixed feelings about the European Union — due to issues he’s faced with setting up golf courses in EU member countries. I kid you not. No question what really matters to him!

But the president refused to recognize the deep concerns of European allies about Russian efforts to undermine their systems. Indeed, Trump refused to commit to the NATO charter’s Article Five, which commits each member to having the back of every other. This handed a free gift to Putin.

To be clear, trade and European defense spending are legitimate issues, but not the heart of the matter. At a time of new and growing challenges to Western democracies it is essential to reaffirm our ties to historic allies.

The meaning of those ties was eloquently expressed by Donald Tusk, a top EU official and former Polish prime minister. He told Trump: “What gives our cooperation and friendship its deepest meaning are fundamental Western values, like freedom, human rights, and respect for human dignity. The greatest task today is the consolidation of the whole free world around those values, and not just interests.

“Values and principles first — this is what we, Europe and America, should be saying.”

Tusk expressed deep disappointment after his meeting with Trump.

Like other Eastern Europeans who came of age under communist rule, Tusk understands Moscow’s eagerness to re-establish a sphere of Russian imperial influence and power. Yet, for whatever reason, Trump won’t abandon his infatuation with autocrats such as Putin. I believe the reason is Trump’s conviction that only tough guys make deals and he can beat them at their game.

The United States will pay dearly for his delusions.

Putin is using him (even as Kremlin-controlled media pokes fun at him); Russia is working hard to break NATO and the European Union and is delighted at Trump’s cooperation.

China is playing him, with flattery and tiny trade concessions, but no shift in the South China Seas, and no real help on North Korea. As Trump withdraws from global leadership, Beijing is rushing in to fill the vacuum.

Islamist jihadists are watching him, hopeful he will continue his denigration of democracies — undermining the self-confidence they need to combat terrorism jointly. Jihadis can only cheer his blinkered assumption that Gulf autocrats will help him crush them.

Trump is on the wrong side of history, abandoning the values America has stood for at a time when democracies need to be bonding together.

And his withdrawal from the Paris climate accord leaves him even more isolated — aligned only with regressive Nicaragua and the war criminal regime of Syria — with 190 countries on the other side of the issue.

Hail Trump, wannabe leader of the unfree world!

— Trudy Rubin is a columnist and editorial-board member for the Philadelphia Inquirer. Readers may write to her at: Philadelphia Inquirer, P.O. Box 8263, Philadelphia, Pa. 19101, or by email at trubin@phillynews.com.