Romanian opposition leader Traian Basescu has been declared president after defeating his leftist rival in a close-fought election.

Prime Minister Adrian Nastase admitted defeat shortly before official results showed Mr Basescu, mayor of Bucharest, had won more than 51% of the vote.

Mr Basescu will steer Romania into the European Union in 2007 and must speed up reforms required for entry.

He replaces ex-communist Ion Iliescu who has dominated Romania for years.

With all returns counted, Mr Basescu took 51.23% of the vote compared to 48.77% for Mr Nastase, who was the outgoing president's choice of successor.

Mr Basescu, 52, said his priority was to form a government capable of continuing membership negotiations for Romania to join the European Union.

Opposition supporters started celebrating on Sunday evening

"We must succeed in living up to the necessary standards so that
Romanian society meets the demands of the Union," he told journalists.

He warned that Euro-scepticism arose when people were "frozen out of
the integration process".

The centre-right victor also pledged tough action on hidden poverty and described corruption as "a real threat to the country".

The opposition camp scented victory on Sunday evening and supporters spilled out onto the capital's streets, clutching opposition orange flags and balloons and singing and dancing.

Mr Basescu has called for the celebrations to be peaceful and a rally is planned for Monday evening.

Horse-trading

The BBC's Nick Thorpe reports from the Romanian capital, Bucharest, that it was a dramatic few hours before the result was announced and the prime minister's Social Democrats appeared stunned by the outcome.