Mr Tadic wants to push forward his European integration agenda

Mr Tadic was re-elected by more than 50% of voters in a contest that saw a high voter turnout.

Car horns could be heard around Belgrade as Mr Tadic's supporters took to the streets of the Serbian capital to celebrate the victory.

The election was seen as a referendum on Serbia's relations with Europe.

This president will lead us to Europe, for which we can hardly wait

Boris Tadic's supporter

Boris Tadic profile

"Serbia has shown its great democratic potential," Mr Tadic said in his victory speech.

He lauded Mr Nikolic for his performance in the knife-edge contest, and said the country still had hard work ahead.

The European Union's Slovenian presidency welcomed the result of Sunday's poll.

"The EU wishes to deepen its relationship with Serbia and to accelerate its progress towards the EU, including candidate status," it said in a statement.

The election comes at a sensitive time as Serbia's Kosovo province prepares to declare independence.

'Stop blackmailing'

Serbia's electoral commission said Mr Tadic had secured 51% of the votes compared to Mr Nikolic's 47% in a closely monitored election.

Monitors put turnout at about 67%.

My message to the EU is to stop blackmailing Serbia and stop putting impossible conditions

Tomislav Nikolic

In Belgrade, Mr Tadic's backers - many waving Serbian and EU flags - celebrated the victory with fireworks.

"All our hopes are possible now to come true," one supporter was quoted as saying by the Associated Press news agency.

"This president will lead us to Europe, for which we can hardly wait," another supporter said.

Sunday's vote saw the highest turnout since 2000

Admitting defeat at his party's headquarters, Mr Nikolic congratulated his opponent, but added: "My message to the EU is to stop blackmailing Serbia and stop putting impossible conditions, that we are ready to be within the EU, but there are some conditions we cannot fulfil."

His comment was an apparent reference to EU pressure on Serbia to accept Kosovo's independence.

The election had been seen as a fundamental choice for the country, which has yet to fully shake off the isolation of the 1990s.

The reformist Mr Tadic had campaigned on a ticket promising EU-backed prosperity against Mr Nikolic's pro-Moscow campaign.

Both candidates argued against independence for the largely ethnic Albanian province of Kosovo.

Serbia is widely seen as key to the stability of the western Balkan region.

War crimes trials

With Kosovo looking set to declare independence within weeks, the BBC's Nick Hawton in Belgrade says many Serbs see the vote as a referendum on their country's future.

Kosovo has been run by the UN since 1999, when a US-led Nato bombing campaign drove out Serb forces accused of a brutal crackdown on ethnic Albanian separatists.

The US and most of the EU members back the independence plan, while Serbia and Russia are strongly opposed to it.

Mr Tadic, a psychology graduate and former defence minister, leads the Democratic Party, which has made pushing for Serbian entry to the EU a priority.

He supports the free market and democratic reforms, and advocates co-operation with the UN war crimes tribunal in The Hague.

Commander in chief

Mr Nikolic, who believes in closer ties with Russia, was one of the founders of the hardline nationalist Serbian Radical Party.

The Radicals were allies of the ex-President, Slobodan Milosevic, and their leader, Vojislav Seselj, is currently on trial at The Hague for his role during the wars of the 1990s.

While the presidency is a largely ceremonial office, the president is commander-in-chief of the armed forces, a role which carries strong symbolic weight, our correspondent says.

Ethnic Albanian leaders in Kosovo have hinted that the expected declaration of independence may be delayed, after saying earlier this week it was "an issue of days".

Brussels has asked Kosovo's leadership to wait until an EU civilian mission can take over from the UN.