An army captain in Burkina Faso has announced on national television that he has ousted military leader Lt Col Paul-Henri Damiba.
Ibrahim Traore cited Lt Col Damiba's inability to deal with an Islamist insurgency as the reason.
He also announced that borders were closed indefinitely and all political activities were suspended.
Lt Col Damiba's junta overthrew an elected government in January, citing a failure to halt Islamist attacks.
But his administration has also not been able to quell the jihadist violence. On Monday, 11 soldiers were killed when they were escorting a convoy of civilian vehicles in the north of the country.
Earlier on Friday, Lt Col Damiba urged the population to remain calm after heavy gunfire was heard in parts of the capital.
More than 20 armed soldiers - most with their faces covered - appeared on state TV shortly before 20:00 local time.
"Faced with the deteriorating situation, we tried several times to get Damiba to refocus the transition on the security question," said the statement signed by Traore.
"Damiba's actions gradually convinced us that his ambitions were diverting away from what we set out to do. We decided this day to remove Damiba," it said.
A curfew from 21:00 to 05:00 was also announced.
Lt Col Damiba's whereabouts are not known.
The United States said it was "deeply concerned" by events in Burkina Faso and encouraged its citizens to limit movements in the country.
"We call for a return to calm and restraint by all actors," a State Department spokesperson said.
The Economic Community of West African States (ECOWAS) condemned the move, stating it "reaffirms its unreserved opposition to any taking or maintaining of the power by unconstitutional means".
Before dawn, shots and explosions were heard in the capital, Ouagadougou, some of them coming from near the presidential palace and main military barracks.
After sunrise, the normally bustling city was largely deserted, with soldiers on the streets blocking some roads and guarding key strategic points.
State television had stopped broadcasting and more gunfire was heard later in the day.
Lt Col Damiba said there was a "confused situation" created by "mood swings" among some soldiers as rumours of a coup intensified.
Urging people to remain calm and avoid social media speculation, the military leader said there were "negotiations under way to bring back calm and serenity".

In January, Lt Col Damiba ousted President Roch Kaboré, saying that he had failed to deal with growing militant Islamist violence.
"We have more than what it takes to win this war," the junta chief said when he was sworn in as president in February.
But many citizens do not feel any safer and there have been protests in different parts of the country this week.
On Friday afternoon, some protesters took to the capital's streets calling for the removal of Lt Col Damiba.
The Islamist insurgency broke out in Burkina Faso in 2015, leaving thousands dead and forcing an estimated two million people from their homes.
The country has experienced eight successful coups since independence in 1960.
Latest Stories
-
Could gum disease affect your performance? Experts weigh in
1 hour -
Savannah Regional Minister commends Saha Global for water expansion initiative
2 hours -
Ningo-Prampram MP secures emergency water relief, GWCL MD to visit for long-term solution
2 hours -
Aspiring media professionals admonished to pursue impactful practice, not quick riches
2 hours -
E.P College of Education holds 18th matriculation ceremony
2 hours -
Vigil night to be held for late Mawuli Semevo at National Theatre
2 hours -
LEAP: Gov’t to pay over GH₵200m to 350k households
2 hours -
Leave government if you want to be a miner – Mahama cautions appointees
2 hours -
Kejetia Market management asked to step aside for investigations on allegation of mismanagement
3 hours -
I didn’t ask you to join my Kennedy Agyapong lawsuit – Anas to Obinim
3 hours -
World Cup 2026Q: Chad players who could threaten Ghana’s redemption mission
3 hours -
Adum fire outbreak has been curtailed – Chief Fire Officer
3 hours -
High Court dismisses FGR/Blue Gold suit against Heath Goldfield’s lease to Bogoso Prestea Mines
3 hours -
Bibiani Magistrate Court remands 42-year-old farmer for attempting to kill ex-wife
4 hours -
Muntaka vows to look into excesses in ongoing ‘raids’ on former officials
4 hours