BELGRADE, Serbia —

Russian Prime Minister Dmitry Medvedev on Saturday vowed to further strengthen ties with Balkan ally Serbia, whose president described relations with Moscow as the best in decades despite the country’s efforts to join the European Union.

Serbia remains Russia’s key ally in Europe. Belgrade has refused to join Western sanctions against Russia over Ukraine and plans to sign a free trade agreement with a Russia-led economic bloc next week.

During his visit, Medvedev attended a military show marking the 75th anniversary of the liberation of the Serbian capital from Nazi occupation by Soviet and Yugoslav communist-led troops. He addressed Serbian lawmakers and oversaw the signing of several agreements boosting economic and other ties.

“We are very pleased to be spending this day here, among friends,” Medvedev told reporters. “There are not too many countries for which we in Russia can say are our friends … it is our task to further build our relations in a friendly but pragmatic way.”

Russia also has helped Serbia strengthen its military, which has fueled Western concerns about tensions in the Balkan region that remains fragile following the wars in the 1990s.

“I think … I can say that our relations are on the highest level in the past several decades,” Serbian President Aleksandar Vucic told reporters. “We are particularly interested to continue our cooperation.”

In his speech to lawmakers, Medvedev thanked Serbia for its refusal to join the Western sanctions and added that Russia will continue to support Belgrade on the issue of Kosovo, a former province whose 2008 declaration of independence Serbia does not recognize.

“Russia backs the people of Serbia and is ready to provide any assistance possible to help you preserve sovereignty and territorial integrity,” Medvedev said.

Moscow recently has stepped up efforts to restore its influence among the former communist nations in Eastern Europe amid discontent in the West, which has sought to push the volatile Balkan region toward EU and NATO integration after the conflict in the former Yugoslavia.

Serbia has pledged to stay out of NATO, partly because the alliance bombed the country in 1999 to end a conflict in Kosovo. Vucic said Saturday that Serbia “will know how to protect on our own our sky, our land and our people.”