Opposition candidate John Atta Mills has won a tight presidential run-off in Ghana, electoral officials have said.
The announcement came after results from the last constituency to vote showed him extending his lead over his rival, Nana Akufo-Addo.
Mr Akufo-Addo’s ruling party boycotted Friday’s vote, in Tain constituency.
Both sides have alleged vote-rigging in the poll. The run-off was closely watched as Ghana remains a rare example of democracy in West Africa.
The electoral commission said the results of the run-off showed Mr Atta Mills had won narrowly with 50.23% of the votes, against 49.77% for Mr Akufo-Addo.
“On the basis of the official results given, it is my duty to declare Professor John Evans Atta Mills the president-elect of the Republic of Ghana,” the commission’s head, Kwado Afari-Gyan, said in the capital, Accra.
He said the commission had considered allegations of vote-rigging by both sides but “did not find the evidence provided sufficient to invalidate the result”.
Outgoing President John Kufuor earlier urged both candidates to respect the final result.
He appealed for calm and said any complaints of vote-rigging should be dealt with by the courts after the new president is expected to be sworn in on Wednesday.
There are scenes of jubilation at the headquarters of Mr Atta Mills’ National Democratic Congress (NDC) in Accra, the BBC’s Will Ross says.
Although Ghana remains a very divided nation when it comes to choosing a president, it has proved that democracy can work, our correspondents say.
Mr Atta Mills, aged 64, is a former vice-president. He lost two previous elections to President Kufuor.
Mr Akufo-Addo, also 64, from the New Patriotic Party (NPP) won the first round of the presidential election but not by enough to avoid the run-off.