The case was broadcast live on television and radio.
Ghana’s Supreme Court has upheld the election of President John Mahama after dismissing an appeal filed by the opposition against the mandate he secured last year.
The court ruled that Mr. Mahama was “validly elected”.
“The first respondent was validly elected and the suit is dismissed,” chairman of the panel of Judges William Atuguba announced by a unanimous verdict.
Mr. Mahama had defeated the National Patriotic Party’s Nana Akufo-Addo by 50.7 per cent to 47.7 per cent in the disputed December 2012 election.
But the NPP alleged the election was fraudulent, and asked the court to nullify some four million votes, alleging the result was tampered with to guarantee Mr. Mahama victory in the first round of the election. The ruling National Democratic Congress (NDC) denied the charge.
Mr. Akufo-Addo had previously pledged to respect the court’s decision. Mr. Mahama was inaugurated in January.
Ghanaians have been spellbound by the eight-month case, following it closely on radio and television, the BBC says.
The NDC argued that any mistakes made by polling station officials while recording ballots was not an attempt to subvert democracy, and there were insufficient grounds for the court to overturn the result.
The case was broadcast live on television and radio and nearly 30,000 security officers were deployed across Ghana to prevent an outbreak of violence after the court verdict.