Burkina Faso's army said on Monday it had ousted President Roch Kabore, suspended the constitution, dissolved the government and the national assembly, and closed the country's borders.
The announcement cited the deterioration of the security situation and what the army described as Kabore's inability to unite the West African nation and effectively respond to challenges, which include an Islamist insurgency.
Signed by Lieutenant Colonel Paul-Henri Sandaogo Damiba and read by another officer on state television, the announcement said the takeover had been carried out without violence and that those detained were at a secure location.
The statement was made in the name of a previously unheard-of entity, the Patriotic Movement for Safeguard and Restoration, or MPSR, its French-language acronym.
"MPSR, which includes all sections of the army, has decided to end President Kabore's post today," it said.
Kabore's whereabouts were unknown on Monday, with conflicting accounts of his situation.
Army putsches have toppled governments over the past 18 months in Mali and Guinea. The military also took over in Chad last year after President Idriss Deby died fighting rebels on the battlefield in the country's north.
Landlocked Burkina Faso, one of West Africa's poorest countries despite being a gold producer, has experienced numerous coups since independence from France in 1960.
The MPSR said it would propose a calendar for a return to constitutional order "within a reasonable time frame, after consultations with various sections of the nation."
The U.S. State Department on Monday said it was aware of reports that Kabore had been detained by the military and called for his release. It added that it was "too soon" to officially characterize developments in the West African country, when asked if Washington was undertaking a coup assessment.
U.N. Secretary-General Antonio Guterres "strongly condemns any attempted takeover of government by the force of arms" in Burkina Faso and calls on the coup leaders to lay down their weapons, a U.N. spokesman said after the army statement.
The broadcast came after two days of confusion and fear in Ouagadougou, the capital, where shooting erupted at army camps on Sunday, with soldiers demanding more resources for their fight against Islamist militants.
Several hundred residents gathered in Ouagadougou's central Place de la Nation to show their support for the coup.
"We are really happy. We have been out for two days to support the army," said Ibrahim Zare. "We are behind them."
Intense gunfire was heard in the area around Kabore's residence overnight.
Earlier, Kabore's party said he had survived an assassination attempt, but gave no details. It also said his personal residence had been sacked.
Several armoured vehicles belonging to the presidential fleet could be seen near Kabore's residence on Monday, riddled with bullets. One was spattered with blood.
Security sources gave conflicting accounts of Kabore's situation, with some saying he was being detained by the coup organisers and others saying forces loyal to him had taken him to a secure location. Reuters could not independently verify his circumstances.
Islamist militants control swathes of Burkina Faso's territory and have forced residents in some areas to abide by their harsh version of Islamic law, while the military's struggle to quell the insurgency has drained scarce national resources.
Kabore had faced waves of protests in recent months amid frustration over killings of civilians and soldiers by militants, some of whom have links to Islamic State and al Qaeda.
Ouagadougou resident Eli Sawagogo said the coup had not come as a surprise to him.
"It was expected because the country has been in this situation for six years without a real solution to this terrorism," he said. "If a coup is the solution, then it is welcome."
Corinne Dufka, West Africa director at Human Rights Watch, said Kabore's government had shown itself unable to tackle a range of problems.
"The coup, and apparent support for it, lays bare the inadequacies of Kabore's government to address deep-seated problems with corruption, governance and civilian protection, which were all made exponentially worse by the armed Islamist threat," she said.