The presidential election in Ivory Coast is set to go into a second round after neither of the two top candidates reached 50% of the vote.
With all the ballots counted from Sunday's first round, incumbent Laurent Gbagbo won 38% and opposition leader Alassane Ouattara 32%, the election commission said.
The run-off is expected on 28 November.
The poll is intended to fully reunify the country, after years of rebel control in the north.
The election, due since 2005, had been postponed six times and turnout was around 80% - one observer said this was one of the highest rates ever seen in Africa.
Some feared violence could break out after the announcement of the final results but so far, everything has been quiet in the world's biggest producer of cocoa - the raw ingredient for chocolate.
However, the party of former President Henri Konan Bedie, who came third with 25%, has said the polls were rigged and demanded a recount.
Several hundred activists from his Ivory Coast Democratic Party (PDCI) demonstrated outside the party's headquarters in the main city, Abidjan, using burning tyres to block the main road.
International observers said the polls were credible, despite some organisational short-comings.
The results have now been submitted to the constitutional court for its approval and the United Nations, which has some 8,500 peacekeepers in the country, will also need to certify the results.
Mr Ouattara, a former IMF economist, won an overwhelming majority in the mainly Muslim north, where many people have complained that they have faced discrimination.
He was excluded from previous polls amid accusations that his parents were of foreign origin.
The PDCI is formally in an opposition alliance with Mr Outtara's Rally of Republicans (RDR) but the BBC's John James in Abidjan says it is not certain that all of Mr Bedie's votes will transfer to Mr Ouattara.
Ivory Coast is divided along regional and ethnic lines, with Mr Gbagbo gaining most votes in the west and Abidjan, and Mr Bedie popular with the central Baoule people.
Ivory Coast used to be seen as a haven of political stability and prosperity in West Africa.
The PDCI governed Ivory Coast for 39 years since independence until Mr Bedie was ousted in a coup in 1999.
Northern rebels took up arms in 2002, dividing the country for five years, until a power-sharing deal was signed in 2007.
The ex-rebel New Forces leader Guillaume Soro became prime minister but - aged 38 - he is too young to stand in the election.