The political situation in Gabon is "under control" following an attempted military coup, a spokesman for the government has said.
All five of the rebels who tried to take charge have now been arrested by the authorities.
The junior officers claimed they seized power "to restore democracy" in oil-rich Gabon, where the ailing leader's family has ruled for 50 years.
Tanks and armoured vehicles could be seen in the capital Libreville.
One of the rebels was on the run for a brief period, before being found hiding under a bed, reports Radio France Internationale.
"The situation is calm. The gendarmes who are often stationed there have taken control of the entire area around the radio and TV headquarters, so everything is back to normal", said Guy-Bertrand Mapangou. a government spokesman.
Mr Mapangou said that the army generals, civil society and opposition leaders mentioned in the rebels' statement as potential supporters would be investigated.
Soldiers announced they had seized power on state television
Current leader Ali Bongo succeeded his father Omar Bongo as president in 2009. He narrowly won re-election in 2016 in a poll marred by violence and accusations of fraud.
What happened this morning?
The five soldiers took control of the national radio station at 04:30 local time (03:30 GMT) to read a short statement announcing a "National Restoration Council".
In a video circulating on social media, three young soldiers can be seen in a radio studio wearing military fatigues and holding guns.
Lt Kelly Ondo Obiang, who said he represented a group called the Patriotic Movement of the Defence and Security Forces of Gabon, specifically appealed to young people to "take charge of their destiny".
The insurgents called on soldiers to take control of the transport system, ammunition reserves and airports "in the interests of the nation".
The BBC's Firmain Eric Mbadinga said the coup attempt came as a huge surprise. The army has always been seen as loyal to the Bongo family, he said, because it is dominated by the presidential guard, who mostly come from Mr Bongo's home region.
Most of the capital remains calm, an eyewitness told the Reuters news agency. The French government and the African Union condemned the attempted coup.
Five things to know about Gabon
Compared to many other African states, Gabon has seen much less political turmoil, and has had just three presidents since 1960
Former ruler Omar Bongo dominated Gabonese politics for almost four decades, crushing dissent
It is a major oil producer but one third of its people live in poverty
It has a population of 1.8 million people, with an average life expectancy of 62 years. The youth unemployment rate is around 35%
The country's national symbol is the black panther
What more do we know about President Ali Bongo?
The president's term in office has been overshadowed by a long-running French investigation into allegations of embezzlement involving the Bongo family's assets.
Mr Bongo, who has been out of the country for two months, reportedly suffered a stroke in October and received treatment in Morocco.
He sought to put an end to the rumours about his health with a televised new year message in which he said he was feeling fine.
Soldiers said they had been disappointed by the message, calling it "a pitiful sight" and a "relentless attempt to cling onto power."
Mr Bongo has been criticised over his prominent role in the Freemasons - an organisation whose Gabonese chapter he led as lodge master.
But his supporters point to his role in attempting to diversify Gabon's oil-dependent economy, in the face of declining oil reserves.
President Trump has deployed soldiers to Gabon to protect US citizens amid fears of violent protests in the neighbouring Democratic Republic of Congo following its presidential election.
Read also: Coup in Gabon as military 'seizes power'