Gabon's constitutional court has upheld President's Ali Bongo's re-election victory, rejecting an appeal by rival Jean Ping, who had called for a recount over widespread allegations of fraud.
The court, while partially changing the results of the close August 27 vote, said Bongo maintained a lead over his former ally-turned-opponent Ping.
At a televised public hearing overnight in Libreville, in an almost empty room, the court said Bongo had taken 50.66 percent of the vote against 47.24 percent for Ping.
The announcement of Bongo's victory after the bitterly fought election had sparked days of deadly violence.
In his first comments after the ruling, Bongo, 57, appealed for "political dialogue" with the opposition to steer the country out of the crisis triggered by the announcement of his victory.
"I call all political leaders, including the defeated candidates in the August 27 election, for a political dialogue," Bongo said in a speech broadcast on television.
In his legal challenge, Ping had asked for a recount in the Bongo family stronghold of Haut-Ogooue province, where the president won more than 95 percent of the votes and turnout was declared to be more than 99 percent.
EU observers have said there was a "clear anomaly" in those results.
"No one can dispute the fact that Jean Ping has roundly won this election," his spokesman Jean Gaspard Ntoutoume Ayi told AFP after the court announcement, adding that Ping would make a statement on Saturday morning.
Ping, 73, a career diplomat and a former top official at the African Union, had been hoping to end the Bongo family's 50-year grip on power in the oil-rich country of 1.8 million people.
The streets of Libreville were empty ahead of the ruling, with residents fearing a new bout of bloodshed.
With the country in political limbo for nearly a month, concern had been growing that a ruling in favour of Bongo could spark a fresh wave of opposition protests.
Across Libreville, the atmosphere was on a knife-edge with riot police deployed at key junctions in order to head off any more unrest.
- 'Judgement Day' -
Along Libreville's seafront, trucks carrying paratroopers and soldiers, their weapons at the ready, rumbled alongside cars, shared taxis and armoured vehicles on a road that passes both the court and the presidential palace.
Officers in riot gear had begun fanning out through the city on Thursday, and by Friday morning, long queues could be seen outside banks and cash machines.
"Everyone is panicking, everyone is afraid," explained Jean Rodrigue Boukoumou, a teacher who like many others was waiting to withdraw his money to stock up on food.
"We want to withdraw our money to be able to buy provisions. We have families to feed if the country descends into chaos," he told AFP, expressing a widely held fear.
"Judgement day" blared the headline in one newspaper, while another front page led with: "The hour of the last judgement is upon us."
"Until the results are announced, you are requested to avoid going anywhere until further notice," the French embassy said on its website in a notice to its 10,000-strong community in the country.
Ping had warned the country could face serious instability if the court rejected his appeal for a recount.
But the government has warned Ping that he would be held responsible if fresh violence breaks out, and could find himself arrested if he crosses "the red line".
Ping has made clear he believes Bongo has the court in his pocket, referring to it as "the Tower of Pisa that always leans the same way".
The nation erupted in protest after Bongo was declared the winner following an election mired in allegations of fraud.
During the ensuing chaos, demonstrators set fire to the parliament and clashed violently with police, who arrested around 1,000 people.
Opposition figures say "more than 50" people were killed in the violence, but the government gave a figure of three dead.