Aleksandar Vucic has been sworn in as Serbia's new president, promising to work for peace and stability in the war-weary Balkans while strengthening the country's armed forces.

Vucic formally stepped down from his prime minister's post on Wednesday and took over his new role after his landslide win in April's election.

The opposition alleged irregularities during the election campaign, including muzzling the media, both state-owned and private.

"There have been enough burials in the Balkans. It is time to give birth," Vucic said in his inaugural speech, referring to the wars in the southern European region in the 1990s in which he took an active role as a supporter of expanding Serbia's borders at the expense of its neighbours.

"While we have to talk to everyone, we also have to strengthen our defence capacity."

He added that Serbia would not join NATO or become "member of any other military alliance".

Vucic, 47, was a far-right extremist who toned down his rhetoric and founded the Serbian Progressive Party in 2008, moving to Serbia's centre-right, which was largely unoccupied at that time.

Starting as a pro-Russia opponent of the European Union, he turned into a proponent of Serbia's EU membership bid, though he did not abandon close ties with Russia.

IN PICTURES: Afghan refugees stranded in Serbia

During three years as prime minister, Vucic repeatedly said that EU membership is Serbia's "strategic goal".

At the same time, he has been strengthening ties with Serbia's traditional ally Russia, which has agreed to supply fighter jets and battle tanks to its military, heightening tensions in the Balkans.

Al Jazeera's Stefan Goranovic, reporting from Belgrade, said the main issues in Serbia were "the economy and average wages which are not the president’s responsibilities.

"But many political analysts say that he will be very dominant, being by far the most famous political personality of the country," he said.

"Vucic visited Brussels over the last few days where he met top EU officials and confirmed that Serbia will move towards accession. The EU is criticising Serbia for problems in areas like rule of law and media freedom."

On Wednesday, there were sporadic clashes between Vucic's supporters and his opponents in downtown Belgrade as police prevented demonstrators from reaching the parliament building.

The presidency is largely a ceremonial post, but as Vucic's speech indicated, he intends to continue playing a lead role in Serbian politics.