Ghana's presidential election has been won by incumbent John Mahama, the electoral commission has announced.

It said Mr. Mahama had secured 50.7% of votes, with opposition leader Nana Akufo-Addo on 47.74%.

However, the opposition NPP says it will contest the result, accusing the governing NDC party of conspiring with commission staff to fix Friday's poll.

Ghana, one of the world's fastest-growing economies, is regarded as one of Africa's most stable democracies.

The election was declared free and fair by the regional body, the Economic Community of West African States (Ecowas) and a local group, the Coalition of Domestic Election Observers (CODEO).

“There were hiccups but not such that would grossly undermine the result of the election,” said former Nigerian President Olusegun Obasanjo, who led the Ecowas observer team to Ghana, AP news agency reports.

In a statement, CODEO said the result was a “generally accurate reflection” of the support of Mr Mahama and Mr Akufo-Addo.

“CODEO advises all the presidential election contestants and their supporters as well as the general public to place confidence in the electoral commission's official presidential election results,” it said.

In his first address after being declared the winner, President Mahama urged “all leaders of all political parties to respect the voice of the people”.

He added: “The voice of the people is the voice of God.”

Police in the capital Accra fired tear gas to disperse opposition protesters from outside the commission's offices on Sunday evening.

Tanks guarded the electoral commission and roads around the offices were barricaded by police as the results were announced.