BELGRADE, Serbia — Serbia is likely to get a government with ambitions to join the European Union despite the election of a pro-Russian nationalist as the country’s new president, officials said Monday.

Tomislav Nikolic, a former ultranationalist ally of late Serbian strongman Slobodan Milosevic, beat incumbent Boris Tadic for Serbia’s presidency on Sunday. The result that could slow down the Balkan country’s attempts to join the EU and reconcile with wartime foes, including the former province of Kosovo that declared independence in 2008.

However, Tadic’s Democrats are likely to form a new government with the Socialists, leaving Nikolic without real power as a figurehead president.

Ivica Dacic, the leader of the Socialists, said that the pre-election agreement with the Democrats remains in place regardless of Nikolic’s victory.

But Dacic conceded that “everything will be more complicated.”

“The president appoints the prime minister-designate, and the question is whom he will choose,” Dacic said.

Nikolic gave no indication who he would propose in his victory speech.