Countries like Bulgaria have spent decades balancing East and West, and playing one off the other. But the prospect of President Trump’s moving closer to Mr. Putin has scrambled that strategy, as have the conflicting messages coming out of the new American administration.

Mr. Trump has seemed eager for closer Kremlin ties, even echoing Moscow’s disdain for NATO and the European Union. But last week, his new ambassador echoed the Obama administration’s harder line, saying the United States would not withdraw sanctions against Russia until the country pulled its troops out of Crimea.

At the same time, Mr. Putin has been showing new signs of swagger in his dealings with Russia’s neighbors; on Thursday he arrived in Hungary for his first foray into Europe in the Trump era.

Bulgaria is an eager member of the European Union, but as rising nationalism caused support for the union to wane, here and elsewhere, Russian influence has crept in. On the surface, this suggests that Mr. Trump’s outreach to Moscow, if genuine, would be good for Bulgaria — and, indeed, nationalists are thrilled.

But Bulgaria has also known so many betrayals and occupations that this sudden lurch has inspired as much worry as elation, including fears that Mr. Trump and Mr. Putin will forge a bargain between themselves that serves their two nations but carves up the region into spheres of influence, just as the major powers did at the end of World War II.