The coup was staged in the early hours of Monday morning when Gabon military officers occupied the state radio station declaring their dissatisfaction with President Ali Bongo, who is now in Morocco recovering from a stroke.
Government spokesperson Guy-Bertrand Mapangou told the BBC that the government had taken back control of the area around the state broadcaster and said the situation was under control following a string of arrests.
Earlier a soldier, who identified himself as Lieutenant Obiang Ondo Kelly, announced the military had seized control of the country broadcasting from the offices, The Associated Press reported.
Soldiers entered the national radio station in Libreville around 4 a.m. local time to read a statement in which they announced the setting up of a "national council of the restoration".
When the three armed soldiers hijacked Gabon's state media yesterday, they claimed President Bongo was no longer fit for office after suffering a stroke in Saudi Arabia in October. Bongo has been president since succeeding his father, Omar, who died in 2009.
President Trump has deployed soldiers to Gabon to protect U.S. citizens amid fears of violent protests in the neighbouring Democratic Republic of Congo following its presidential election.
His critics seized on signs of apparent ill-health, pointing to an address that was unusually short, his slurred speech and a right hand that seemed stiff and immobile. Any potential decline in Gabon's oil production due to the coup would not have any noticeable effect on OPEC's total production, considering that Gabon's output accounts for just 0.5 percent of the cartel's total production.
Consulates in Melbourne and Canberra evacuated over 'suspicious package'
Seven foreign consulates have been evacuated in Melbourne after the discovery of suspicious packages. A spokesman for the USA consulate in Melbourne also confirmed it had received a suspicious package.
A curfew remains in place over Gabon's capital Libreville, where forces loyal to President Ali Bongo patrol the streets. Residents said internet access was cut.
"The eagerly awaited day has arrived when the army has made a decision to put itself on the side of the people in order to save Gabon from chaos".
"The government is in place, the institutions are in place", a Gabon government spokesman stated, speaking about the attempted coup.
Gabon - one of Africa's top oil producers - has been ruled by the Bongo family for more than 50 years. His constitutional powers were recently transferred to the Prime Minister and Deputy President.
In his speech on New Year's, Bongo acknowledged health problems but said he was recovering.
Bongo was re-elected in 2016 as the President of Gabon with narrow margins of votes in a poll marred by violent protests and fraud.