Ghana's Supreme Court has upheld President John Dramani Mahama's win in elections last year, dismissing the opposition's case alleging voter fraud in a test for one of Africa's most stable democracies.
Thursday's decision ended a months-long saga that had riveted the west African nation of 25 million people seen as a rare beacon of democracy in the turbulent region.
Shortly after the ruling was announced, opposition leader Nana Akufo-Addo conceded defeat and said he would not seek further review of the decision.
"Whilst I do not agree with the court's decision, I accept it," Akufo-Addo told journalists at his home in the capital Accra as dozens of supporters gathered outside.
"We shall not be asking for a review," he said, adding that he had spoken to Mahama and congratulated him.
Mahama was due to address the nation on Thursday evening, but a statement on his Twitter account said "this is a victory for Ghana's democracy."
In the December polls, Ghana's electoral commission said Mahama took 50.7 percent of the vote over ex-foreign minister Akufo-Addo's 47.7 percent.
"The first respondent (Mahama) was validly elected and the petition is therefore dismissed," presiding judge William Atuguba said, reading from the verdict issued by the nine-justice panel.
The sometimes-tense proceedings were broadcast live on radio and television and were followed closely across the nation.
There was a heavy police presence deployed around the court ahead of the ruling, with access to the chamber tightly restricted.
After the decision was announced, opposition NPP supporters quickly filed out, while the president's loyalists waved party flags and cheered. There were no immediate reports of trouble.
In Washington, deputy State Department spokeswoman Marie Harf said the United States "commends Ghana's commitment to a peaceful resolution of the 2012 presidential election dispute through a legal process."
"Ghana remains a model for democratic governance, rule of law, and stability," she added.
While observers had broadly declared the vote fair, the NPP levelled an array of allegations, including that tally sheets had been doctored and ballot boxes stuffed.
Some of the judges found merit in certain NPP allegations, but as a group they declared Mahama's win legitimate.
Hundreds gathered to celebrate outside the headquarters of Mahama's NDC party.
The 2012 elections were generally unmarred by violence and many in Ghana are wary of the type of bloody unrest seen after recent elections in Nigeria and neighbouring Ivory Coast.
There had been widespread calls for restraint ahead of the court's decision.
Everything from the conduct of the lawyers and witnesses to the quality of the evidence had been debated on the airwaves and written about in Ghana's feisty press.
Editor of the Daily Searchlight newspaper Ken Kuranchie was jailed for 10 days in July for contempt after publicly criticising the judges.
The jailing sparked debate over Ghana's contempt laws, many of which date back to British colonial rule.
Ghana is west Africa's second-largest economy, thanks to exports of gold and cocoa along with a nascent oil industry, which began production in 2010.
Since 1992, the country has held six multi-party elections in a region where democracy remains fleeting for many.
Mahama's successful campaign was built around his promise to continue the work of President John Atta Mills, his predecessor, who died in office in July 2012. Mahama, who was vice president at the time, took over after Mills's death.
Policemen stand guard in front of Ghana's Supreme Court after it upheld President John Dramani Mahama's win in elections last year, dismissing the opposition's case alleging voter fraud in a test for one of Africa's most stable democracies, on August 29, 2013 in Accra.
Ghanaian President John Mahama attends the ECOWAS Summit in the Nigerian capital Abuja on July 18, 2013. Ghana's Supreme Court on Thursday upheld Mahama's win in elections last year, dismissing the opposition's case alleging voter fraud.
Supporters demonstrate in front of Ghana's Supreme Court after it upheld President John Dramani Mahama's win in elections last year, dismissing the opposition's case alleging voter fraud in a test for one of Africa's most stable democracies, on August 29, 2013 in Accra.
Attorney for the ruling National Democratic Congress party Tsatsu Tsikata (C) addresses the media on August 29, 2013 in Accra, after Ghana's Supreme Court upheld President John Dramani Mahama's win in elections last year.