WARSAW — Europe’s right-wing populists have scrambled to outdo one another in celebrating Donald J. Trump as an American president who shares many of their nationalistic, anti-immigrant attitudes. Less thrilled are the hard-liners in Poland. And the problem is Vladimir V. Putin.

Poland already has one of Europe’s most conservative governments, which took office a year ago. And top leaders have eagerly cast Mr. Trump’s election as the latest and most crucial chapter in a global shift away from Western-style liberal democracy. But they also see a worrisome problem: the chummy noises Mr. Trump has made toward Mr. Putin, the Russian president.

Even as the government may share many of Mr. Putin’s conservative attitudes and nationalist impulses, Polish leaders are restrained by a deep, almost visceral distrust of him. Memories of Russian domination during the Soviet era are still raw here, and Poland has been one of the most hawkish members of the European Union on taking a hard line toward Mr. Putin.

The Polish predicament is yet another reminder of how thoroughly the Trump victory has scrambled the geopolitics of Europe. His campaign remarks undercutting NATO, and suggesting that the United States could possibly walk away from the trans-Atlantic alliance, alarmed leaders in the Baltics and in Poland — even after Mr. Trump softened his remarks.