Military officers seized control of Burkina Faso on Friday, claiming to be restoring peace to the jihadist-wracked country as they dismissed a junta leader who had himself come to power in a coup at the start of this year.
In the capital Ouagadougou, witnesses heard pre-dawn gunfire around the presidential palace and junta headquarters.
Then just before 8 pm (2000 GMT), more than a dozen soldiers in fatigues appeared on the state television and radio broadcaster to announce the removal of Lieutenant-Colonel Paul-Henri Sandaogo Damiba for failing to stem a jihadist insurgency.
In his place, they proclaimed 34-year-old Captain Ibrahim Traore in charge.
"We have decided to take our responsibilities, driven by a single ideal: the restoration of security and integrity of our territory," they said.
"Our common ideal was betrayed by our leader in whom we had placed all our trust. Far from liberating the occupied territories, the once peaceful areas have come under terrorist control."
The rebelling military also announced the closure of air and land borders from midnight, as well as the suspension of the constitution and the dissolution of the government and transitional legislative assembly.
A curfew from 9:00 pm to 5:00 am was also put in place.
New strongman Traore was previously head of anti-jihadist special forces unit "Cobra" in the northern region of Kaya.
Ousted leader Damiba's fate remained unknown.
The coup plotters promised to convene "the nation's active forces" to designate a "new president of Faso, whether civilian or military".
The United States said it was "deeply concerned" by the situation in Ouagadougou and encouraged its citizens to limit movements.
"We call for a return to calm and restraint by all actors," a State Department spokesperson said.
Earlier on Friday, Damiba's Patriotic Movement for Preservation and Restoration (MPSR) had said there was an "internal crisis in the army" prompting troop deployments in key areas of the capital.
AFP journalists saw troops block several main roads and intersections in Ouagadougou, with soldiers also stationed outside the state television centre.
Government spokesman Lionel Bilgo had said the "crisis" concerned an army pay dispute, and that Damiba was taking part in negotiations.
During the morning, shots rang out in the Ouaga 2000 neighbourhood, which houses both the presidential and military junta headquarters.
"I heard heavy detonations around 4:30 am and now the roads around my home have been sealed off by military vehicles," a resident close to the presidential palace said.
State television was cut for several hours prior to the military announcement, broadcasting just a blank screen with the message "no video signal".
In the afternoon, an AFP journalist saw a group of several hundred people gather in a city square making a range of demands, including the departure of Damiba and the end of the French military presence.
By the evening the soldiers were still in place at key points of the city, and streets were mostly deserted.
In a statement, the Economic Community of West African States (Ecowas) "condemned in the strongest possible terms the seizure of power by force that has just taken place."
Ecowas called the latest coup "inappropriate" at a time when it said progress was being made for a return to constitutional order by July 1, 2024.
The French foreign ministry told its citizens in the city, believed to number between 4,000 and 5,000, to stay home.
In Brussels, the European Union expressed "concern" at the events unfolding in the Burkina capital.
When he declared himself in charge on January 24, ousting elected leader Roch Marc Christian Kabore, Damiba had promised to make security his priority and end the bloody jihadist attacks.
But these have increased in recent months, especially in the north and east where whole towns have been blockaded by insurgents who have blown up bridged and attacked supply convoys.
As in bordering countries, insurgents affiliated with Al-Qaeda and the Islamic State group have stoked unrest.
Thousands have died and about two million have been displaced by the fighting since 2015 when the insurgency spread into Burkina Faso, which has since become the epicentre of the violence across the Sahel.
More than 40 percent of Burkina Faso, a former French colony, is outside government control.
Attacks have increased since mid-March, despite the junta's vow to make security its top priority.
In September, a particularly bloody month, Damiba sacked his defence minister and assumed the role himself.
Earlier this week, suspected jihadists attacked a convoy carrying supplies to the town of Djibo in the north of the country. The government said 11 soldiers died and around 50 civilians were missing.
On September 5, an improvised explosive device struck a supply convoy in the north killing 35 civilians and wounding 37.
The following day, at least nine people -- seven civilians and two soldiers -- were killed in two separate attacks by suspected jihadists.
Much of the impoverished Sahel region is battling the insurgency.
Starting in northern Mali in 2012, the insurgents attacked neighbouring Burkina Faso and Niger in 2015.
The violence has in recent years begun to spill over into coastal states Ivory Coast, Togo and Benin. (AFP)