The results of a closely fought presidential election in Ghana were announced on Sunday, but peace in this largely stable West African country has been endangered by the losing party’s refusal to accept defeat.

Incumbent President John Mahama, who represents the National Democratic Congress, or NDC, claimed victory with 50.7 percent of the popular vote, according to the Coalition of Domestic Election Observers, or CODEO. The results were affirmed by the Economic Community of West African States, or ECOWAS.

“I call on all leaders of all political parties to respect the voice of the people,” Mahama said in a victory speech. “The voice of the people is the voice of God.”

But for the losing New Patriotic Party, or NPP, the CODEO announcement sounded more like the voice of fraud.

NPP candidate Nana Akufo-Addo came away with approximately 47.74 percent of the popular vote, losing by less than 1 percentage point. In a scathing statement on its official website, the NPP accused the NDC of working to skew the electoral results in its favor.

“It is obvious from the preponderance of evidence available to us that at all material times the ruling National Democratic Congress led by President John Mahama conspired with certain [Electoral Commission] staff in constituencies across the country to falsify the election results and thereby abuse the mandate of the people of Ghana,” said the statement.

“This situation, if allowed to go unchallenged, would seriously damage the essence of the electoral process and largely democracy in Ghana.”

Hundreds of Akufo-Addo supporters came out in full force on Sunday, spurred by early reports from the NPP that the ballot-counting process had been compromised. The demonstrators gathered in front of the electoral commission headquarters in the capital city of Accra. Police used tear gas to disperse them.

For many Ghanaians, the uproar brings back some bad memories. Similar protests erupted after the last general election in 2008. Then, as now, Akufo-Addo lost narrowly to the NDC candidate. But those riots were short-lived, and the NPP accepted defeat peaceably. This time around, opposition officials have vowed to contest the results.

Concerns about new voting technologies will give them ammunition. This weekend, various polling stations unveiled new machines that used fingerprints to verify voters’ identities, but glitches and machinery malfunctions slowed the process down considerably. Some voters waited in line for hours, and officials eventually decided to extend the voting period from Friday into Saturday.

Electoral commission officials admitted to hiccups in the system but asserted that they did not significantly affect the outcome.

If the results hold, it will be Mahama’s first victory at the ballot box. The former vice president ascended to the presidency in July of this year, following the unexpected death of former NDP President John Atta Mills due to illness. The tragedy shocked Ghana, which had never seen a head of state die in office. It may have also tipped the balance in favor of Mahama, whose popular appeal was boosted by Mills’ legacy.

This weekend’s vote was largely a referendum on how well the Mills-Mahama administration has handled Ghana’s recent economic boom.

Last year, Ghana’s economy grew by 14.4 percent -- more than any other African country -- giving it middle-income status, a real point of pride for politicians and citizens alike. The boom was due partly to the discovery of oil in 2007 and a ramping up of crude production since then. Even before that, Ghana enjoyed steady revenues from exports of cocoa and gold.

But an economic slowdown in recent years had imperiled progress. GDP growth this year is expected to reach 7.5 percent -- not bad, but a far cry from 2011. The cost of living is rising as Ghana’s currency weakens. Income disparities are worsening, and food production is down as a result of urbanization. The percentage of people living below the poverty line hovers around 25 percent.

Before this past weekend’s election, candidates from both parties vowed to get Ghana back on track. The NPP pushed policies that favored free-market capitalism, while the NDC favored a more government-centric approach. But these issues took a backseat to most Ghanaians’ primary concern: corruption. This was the keyword that both parties hurled at each other whenever possible throughout the campaign; both Mahama and Akufo-Addo knew that voters are highly protective of Ghana’s reputation as a stable democracy.

In that context, the NPP’s allegations of electoral fraud in this election are sure to hit a nerve. The party used strong language in its public disavowal of Mahama’s victory, calling it a “blatant act of rape of the democratic mandate of the people of Ghana.”

This has raised real worries about a threat to Ghana’s reputation for stability. But even as the country is on high alert, it is worth noting that the vast majority of Ghanaians not only abhor the idea of corruption, they are also quite serious about preventing violence. "Ghana in peace, not in pieces," is a common refrain on the streets of Accra, according to Reuters.

It was just this sensibility that Mahama appealed to even before he won a popular mandate to serve another five years in office.

“Ghana has organized five previous successful elections, and there should not be any reason why this year’s election should not be successful,” he said on Tuesday. “I am very sure God’s favor will allow all of us to smile at the end of the general elections and to rally behind the winner.”