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.
And the fulcrum of its balancing act is the president, Aleksandar Vucic, an increasingly authoritarian leader regarded as a chip off Mr. Putin’s block.
“It is extremely unusual, especially in democracies, to have a government organize a massive rally to welcome a foreign dignitary,” said Vuk Jeremic, the leader of opposition People’s Party, former foreign minister and former president of the United Nations General Assembly.
Mr. Vucic, he said, was betting that Western leaders would watch the throngs of people cheering as he embraced the Russian leader in a European capital and “become even more tolerant toward his autocratic behavior, in the hope that he doesn’t drop Serbia’s formal commitment to join the E.U.”
That has opened an opportunity for Russia, which sees Serbia as a potentially fruitful investment target, especially to supply natural gas.
Mr. Putin has placed heavy public emphasis on new economic agreements, while analysts said he would privately express dismay at Belgrade’s eagerness to join the European Union.
At a brief news conference, Mr. Putin committed $1.4 billion to bring additional Russian gas to Serbia, before he paid tribute to the long history of Russian-Serbian relations.
“They have strong, stable and deep roots — the Russian and Serbian people have always been spiritually close,” Mr. Putin said. Paraphrasing a Serbian expression, he said, “If we are together, then victory awaits.”
For Moscow, Serbia presents a kindred cultural space anchored in their shared Slavic roots and Eastern Orthodox Christian faith, where it can assert itself at a moment when the European Union is perceived as weak, while keeping NATO at bay.
“The world is becoming more black and white,” said Bosko Jaksic, a political columnist in Belgrade. “And I fear when it comes to Serbia, Putin is using Kosovo and gas to export a political model.”
Indeed, any future Serbian accession to the European Union, which remains a long way off, will require Serbia to compromise on Kosovo, which Mr. Putin accused of ratcheting up regional tensions.
Kosovo, a mostly ethnic Albanian and Muslim territory, broke from Serbia in the 1990s under the wing of a NATO bombing campaign. Russia has never recognized an independent Kosovo, and remains one of Serbia’s staunchest backers.
In Serbia, warm feelings for Russia and admiration for Mr. Putin run deep and seem to be growing well beyond the long tradition of strong ties between the military and intelligence services.
Mr. Putin was at the top of a list of most-trusted foreign politicians, with the support of 58 percent of respondents, according to a survey conducted by the newspaper Politika in March.
Even before he arrived, Mr. Putin seemed to be everywhere. Billboards on the highway welcomed Serbia’s “dear friend.” His face was plastered on T-shirts, mugs, pins and even underwear. As he toured historic sites with Mr. Vucic by his side, the Russian national anthem rang out time and again.
In recent years, more than 100 pro-Russian media outlets and nongovernmental organizations have taken root in Serbia, according to the Center for Euro-Atlantic Studies, a Belgrade-based think tank.
Jelena Milic, the head of the think tank, termed Moscow’s varied efforts to exert influence “Putin’s orchestra.”
Her study, “The Russification of Serbia,” detailed efforts by Moscow to undermine public support for European integration and to delay rapprochement with the West.
“There is more and more evidence that some members of ‘Putin’s orchestra’ are financed directly from Moscow,” she wrote.
Serbia is a crucial transit point in Russia’s plans to extend its TurkStream pipeline to supply natural gas across southern Europe, a project that has provoked misgivings in the European Union.
Russian investment in Serbia’s economy has already exceeded $4 billion, Mr. Putin told Politika. It faces stiff competition from China and Turkey among others, however.
To highlight the cultural ties, Mr. Putin visited Belgrade’s newly restored Church of St. Sava, one of the world’s largest Orthodox Christian churches, where Russian businessmen underwrote the cost of the gilded mosaic lining the dome.
Outside the church, a crowd of 100,000 had been assembled to cheer the leaders. But many of those in attendance had been offered incentives to attend, including five liters of milk. Some reported being threatened by bosses that they would lose their jobs if they did not go.
At the news conference, Mr. Putin was asked what he thought about the outpouring and what he would say to the people there.
“My participating in demonstrations is not part of the plans for the visit,’’ Mr. Putin said, smiling. But he added, ‘‘I can say that we have very warm feelings about such manifestations of friendship.”
The gathering stood in sharp contrast to one the night before, when tens of thousands walked along the same route, to the same church, for a candlelight vigil to remember a Serb politician, Oliver Ivanovic, who was gunned down in Kosovo one year ago.
His killers have never been brought to justice, and the death has become a rallying point for those who accuse Mr. Vucic of creating a climate of fear that fuels political violence.
For more than a month, through bitter cold and snow, tens of thousands of Serbs have taken to the streets in protest.
“In our country, we are confronted every day with so many lies and threats,” said one of the organizers, Jelena Anasonovic, 24. “I think democracy, true democracy, is something you need to fight for every day.”
By assembling a sprawling crowd of his own, Mr. Vucic, who has been dismissive of the protests, sought to demonstrate his support at home.
For the international audience, Mr. Vucic had a different goal.
Mr. Jaksic, the political columnist, said Kosovo is at the heart of the balancing act Mr. Vucic is trying to pull off.
“It all starts with the mother of all problems, and that is Kosovo,” he said.
Even if Mr. Vucic managed to achieve lasting peace with Kosovo, Mr. Jaksic said, it might be at the expense of Serbia’s democracy.
“I am against Mr. Vucic because of his authoritarian model,” he said. “He is always talking about my big friend Putin, my big friend Orban, my big friend Erdogan. You can judge him by his friends.”
Mr. Vucic has recently floated the idea of some sort of partition of Kosovo. While he has not publicly offered any details on how that might work, especially given the inherent dangers of redrawing maps in the volatile Balkans, the idea gained momentum last year when John R. Bolton, the Trump administration’s national security adviser, said the United States was open to the idea.
But to go forward, Mr. Vucic would surely need at least the tacit approval of Mr. Putin.
Russia is still grumbling about the name change in nearby Macedonia that should pave the way for its accession to the European Union and NATO, a clear loss in the Balkans for the Kremlin. Although Serbia has no plans to join the military alliance, Moscow wants to maintain a strong embrace.
If Russia were to sign off on the still-undefined plan, observers say it would likely come at a price. For instance, Russia could use it as a pretext to argue for recognition of Crimea as Russian province.
But the vast majority of Serbs, some 70 percent according to recent polls, reject any compromise over Kosovo.
Dejan Garic, 43, was doing a brisk business selling Putin-themed items at his kiosk near Kalemegdan, the ancient fortress situated on a hill overlooking the point where the Sava and Danube rivers meet.
“Putin does not recognize Kosovo, and that is very import for us,” he said. A former soldier who fought in the war, Mr. Garic recalled that “Russians were the only ones helping us.”
He is from southern Kosovo and believed that one day his hometown would be made a part of Serbia again.
One shirt he sold seemed to sum up the popular feeling. Mr. Putin was pictured wearing aviator sunglasses, with a message written in both Serbian and Russian
“Kosovo is Serbia,” it said. “Crimea is Russia.”