An electoral commission official checks the identification of Ghana's President John Dramani Mahama at a polling station in northern Ghana on December 7, 2012.
Incumbent President John Dramani Mahama has won Ghana's presidential election, the electoral commission has announced.
Tanks surrounded the electoral commission headquarters and police barricaded the road around it as the commission's Chairman Kwadwo Afari-Gyan announced on Sunday that Mahama had won 50.7 percent against his New Patriotic Party challenger Nana Akufo-Addo on 47.74 percent.
The vote was held on Friday and Saturday in which nearly 80 percent of the about 14 million registered voters casted their ballots.
In his victory speech, Mahama called on "all leaders of all political parties to respect the voice of the people."
"The voice of the people is the voice of God," he added.
But the opposition alleged fraud in the country that has been called a model of democracy in Africa.
"Indeed, we have enough concrete evidence to show that the 2012 presidential election was won by our candidate, Nana Akufo-Addo," the New Patriotic Party (NPP) said in a statement.
"We have noticed a pattern of fraud, where substantial numbers of votes are either added to the NDC (National Democratic Congress) candidate or subtracted from the NPP presidential candidate," it added.
In 2008, Akufo-Addo lost the presidential election by less than 1 percent in the run-off.
Ghana, one of Africa's fastest-growing economies, is the world's second-largest cocoa producer after neighboring Ivory Coast with a big gold mining industry, second only to South Africa. However, a deep gap still exists between those benefiting from the country's rich resources and those left behind financially.