Libreville: Gabon said it foiled an attempted coup on Monday after a group of soldiers called for a popular uprising while the country's ailing president was abroad.
The soldiers burst into state radio offices at dawn and urged the public to "rise up," in a broadcast made as President Ali Bongo remained in Morocco after suffering a stroke last year.
Three soldiers wearing the green beret of the elite Republican Guard, two of them carrying assault rifles, were visible on a video of the speech released on social media.
But security forces stormed the building, capturing the rebel chief, killing two of his team and freeing journalists and technicians who had been held hostage and forced to help the mutineers make their broadcast, the presidency said.
"The situation is under control," it said in a statement.
Shots were heard earlier around the RTG 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).
Security forces were deployed in the capital and will remain there over the coming days in order to maintain order, a government spokesman said.
The Republican Guard was stationed around the radio building, armoured vehicles blocked access to the area and a helicopter circled overhead, 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.
Elsewhere, much of the city appeared deserted, with businesses closed and local and foreign companies telling their workers to stay home.
Internet access was also briefly cut on government instructions, said an employee of Canal+, one of the main internet providers.
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.
The rebel message was read on state radio by a person who identified himself as Lieutenant Ondo Obiang Kelly, describing himself as deputy commander of the Republican Guard and head of a previously unknown group, the Patriotic Youth Movement of the Gabonese Defence and Security Forces.
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.
"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.
The African Union and France strongly condemned the attempted coup and warned against any "unconstitutional" change of power in Gabon.
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.