Madagascar's former finance minister, Hery Rajaonarimampianina, has won the presidential election, officials in the Indian Ocean nation have announced.
Mr Rajaonarimampianina, allied to incumbent President Andry Rajoelina, won 53.5% of the vote in December's run-off, the electoral commission said.
His rival, Richard Jean-Louis Robinson, has said the second round was rigged and is demanding a recount.
The election is intended to end years of political unrest.
Foreign election observers have urged both parties to respect the electoral process.
The vote has yet to be confirmed by the electoral court which will make the announcement within 15 days.
The elections were the first to be held since a 2009 military-backed takeover, when Mr Rajoelina, who backed Mr Rajaonarimampianina, overthrew the democratically elected government of Marc Ravalomanana.
Electoral officials said Mr Robinson, a former health minister in Mr Ravalomanana's government, took 46.5% of the run-off vote, held on 20 December.
Following the coup, the international community imposed sanctions and the country has since suffered economic paralysis.
The election is an attempt to restore normality to the country and to induce foreign investment and boost anaemic growth.
A relative new comer to politics, Mr Rajaonarimampianina, 55, holds a degree in economics and accounting from the University of Quebec in Canada.
Amongst other election pledges, he promised to help the unemployed, build infrastructure to improve agriculture and reform the education system.
More than 92% of the country's 21 million people live on less than $2 (£1.2) a day, according to the World Bank.