BELGRADE, Serbia — The water in Belgrade’s central fountain was lit Russian red, ceremonial artillery blasts thundered at the palace, and tens of thousands of Serbs were bused in from around the country to welcome President Vladimir V. Putin of Russia on Thursday.

If the tableau seemed more fitting for the days of kings than a typical state visit, these are no ordinary times for Serbia, which once again finds itself tugged between East and West in ways hauntingly reminiscent of the Cold War.

Then, Yugoslavia, with its capital in Belgrade, managed to stay out of the Soviet bloc, though it was nominally aligned with it. Now, amid resurgent competition for political and economic influence in Europe, especially in the Balkans, that strategy seems suddenly relevant.

With Serbia seeking to join the European Union without damaging its ties with Moscow, this country on the eastern flank of Europe is in play all over again.