Ivory Coast's constitutional council has validated the results of last week's presidential election, despite an opposition challenge.
The move points the way to a second round run-off between President Laurent Gbagbo and opposition leader Alassane Ouattara on 21 November.
Mr Ouattara had earlier called for a recount. The results also need to be certified by the UN.
The poll aims to reunify the country after years of partial rebel control.
In a public sitting, the council confirmed preliminary results which gave President Gbagbo around 38% of the vote, short of the 50% needed to avoid a second round, followed by Mr Ouattara, with 32%.
The coalition of four opposition parties demanded a recount of the votes in the 31 October election, according to a statement read by Alphonse Djedje Mady, spokesman for the Rally of Houphouetists for Democracy and Peace (RHDP).
"Serious irregularities" in the first round "led to the loss of hundreds of thousands of votes for RHDP candidates to the benefit" of Mr Gbagbo, he said.
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.
International observers said last week's polls were credible, despite some organisational short-comings.
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.
Ivory Coast is divided along regional and ethnic lines, with Mr Gbagbo gaining most votes in the west and Abidjan.
The country used to be seen as a haven of political stability and prosperity in West Africa.
The party of ex-president Henri Konan Bedie, popular with the central Baoule people, finished third in the first poll and was eliminated from the race.
It governed Ivory Coast for 39 years after 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.
The United Nations has some 8,500 peacekeepers in the country.