A group of soldiers sought to take power in Gabon on Monday while the country's ailing president was abroad, but the government declared the bid had failed and the rebels had been arrested.
Soldiers burst into state radio offices at dawn and called on the public to "rise up", an appeal made as President Ali Bongo remained in Morocco after suffering a stroke last year.
Shots were heard around state broadcasting headquarters in Libreville, capital of the oil-rich West African nation, at about the same time as the message was read at 6:30 am (0530 GMT).
But within a few hours, government spokesman Guy-Bertrand Mapangou told AFP: "Calm has returned, the situation is under control."
Of the five who entered the radio station, "four have been arrested and one is on the run," according to Mapangou.
Security forces have been deployed in the capital and will remain there over the coming days in order to maintain order, he said.
The gunfire, he said, was used to control a crowd.
The elite Republican Guard was deployed around the building and armoured vehicles blocked access to the area, an AFP correspondent saw.
In a rundown district nearby, dozens of young people torched a car and set fire to tyres, while the security forces fired teargas to try to disperse them.
The dramatic developments came as Bongo is living at a private residence in the Moroccan capital Rabat after suffering a stroke. He made a televised speech on New Year's Eve but has not been in the country since October.
- 'Democratic transition' -
A message was read on state radio by a person who identified himself as Lieutenant Ondo Obiang Kelly, the deputy commander of the Republican Guard and head of a previously unknown group, the Patriotic Youth Movement of the Gabonese Defence and Security Forces (MPJFDS).
He announced a "national restoration council" would be formed "to guarantee a democratic transition for the Gabonese people".
The movement "calls on all young people from forces for the defence and security and Gabonese young people to join us," the officer said.
Three soldiers wearing the green beret of the Republican Guard, two of them carrying assault rifles, were visible on a video of the speech released on social media.
"We cannot abandon our homeland," the officer said.
"The eagerly-awaited day has arrived when the army has decided to put itself on the side of the people in order to save Gabon from chaos.
"If you are eating, stop; if you are having a drink, stop; if you are sleeping, wake up. Wake up your neighbours... rise up as one and take control of the street," he said, calling on the people to seize public buildings and airports.
- 'A difficult period' -
The 59-year-old Bongo has not been back to Gabon since he fell ill in Saudi Arabia on October 24.
In his absence, the Constitutional Court transferred part of the powers of the president to the prime minister and the vice president.
The statement read out on Monday attacked the arrangement as "illegitimate and illegal."
On December 31, Bongo addressed the country for the first time since falling ill, saying in a recorded speech from Morocco that he had "been through a difficult period."
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.
The speech was "shameful," the officer said in Monday's address, describing Gabon as "country (which) has lost its dignity."
The Bongo family has governed the equatorial African nation for five decades.
Bongo took over from his father Omar, who took office in 1967 and gained the reputation of a kleptocrat -- one of the wealthiest men in the world, with a fortune derived from Gabon's oil wealth.
He was also a pillar of "Francafrique" -- a now much-contested strategy by which France bound itself to its former African colonies through cronyism, often tainted with corruption and rights abuses.
Ali Bongo was elected head of state after his father's death in 2009.
He was narrowly re-elected in 2016 following a presidential poll marred by deadly violence and allegations of fraud.
The African Union said it "strongly condemns" the coup attempt and reaffirmed its "total rejection of all unconstitutional change of power". - AFP