Riot gear alongside military vehicles were on main streets, but residents did not know the inauguration was taking place.
Gabon President Ali Bongo was sworn in for a second term on Tuesday and called for unity at a low-key ceremony following a razor-thin election victory whose integrity was questioned by international observers.
Bongo's victory by less than 6,000 votes has drawn unwelcome scrutiny on the president, whose family has ruled the oil-producing state in Central Africa for 49 years.
France called for a recount and the European Union said it detected anomalies in Bongo's stronghold province of Haut-Ogooue, where he won 95 percent of the vote on a 99.9 percent turnout. Opposition leader Jean Ping said the election was rigged.
"The elections are over. We must move on to other things," said Bongo in a speech at the red-carpeted palace during his inauguration to a fresh seven-year term.
Fears of violence when the Constitutional Court declined Ping's petition for a recount and ratified the result have not materialized but Tuesday's inauguration ceremony was kept low-key in an apparent attempt to forestall any possible trouble.
Riot gear was preemptively laid out alongside military vehicles on main streets, but many residents did not even know the inauguration was taking place.
"I invite all the major stakeholders in the nation to sit down together in order to find solutions that will satisfy our compatriots," said Bongo who took power in 2009 on the death of his father who ruled for 42 years.
At least six people died in clashes between protesters and security forces when the initial results of the Aug. 27 vote were announced.
The ceremony, attended by the presidents of Mali, Togo, Niger, and Sao Tome and Principe, was announced to the press only the day before.
"The thief has no shame," said Joseph Awasi, 50, as he watched Bongo walk the red carpet on a small TV in a bar.
Other Gabonese expressed indifference to the event, which they considered little more than a formality. Small flags were raised along boulevards in the city centre but there were no other signs of celebration.
"Gabonese are afraid to leave their homes. There are checkpoints everywhere," said Auriol Ondgibi, 27, an unemployed man who waited for the ceremony to start as he ate his breakfast at a cafe. "I want the country to return to normal."
Ping has rejected Friday's court ruling as biased, and the European Union said doubts about the integrity of the process were legitimate.