OUAGADOUGOU, Burkina Faso (AP) — More than a dozen mutinous soldiers declared Monday on state television that a military junta had seized control of Burkina Faso after detaining the democratically elected president following a day of gunbattles in the capital of the West African country.

The military coup in a nation that was once a bastion of stability was the third of its kind in the region in the last 18 months, creating upheaval in some of the countries hardest hit by Islamic extremist attacks.

Capt. Sidsore Kaber Ouedraogo said the Patriotic Movement for Safeguarding and Restoration “has decided to assume its responsibilities before history.” The soldiers put an end to President Roch Marc Christian Kabore’s presidency because of the deteriorating security situation and the president’s inability to manage the crisis, he said.

It was not immediately known where Kabore was, and the junta spokesman said only that the coup had taken place “without any physical violence against those arrested, who are being held in a safe place, with respect for their dignity.”

A soldier in the mutiny, who spoke on condition of anonymity due to the sensitivity of situation, told The Associated Press that Kabore had submitted his resignation.

The new military regime said it had suspended Burkina Faso’s constitution and dissolved the National Assembly. The country’s borders were closed, and a curfew was in effect from 9 p.m. to 5 a.m.

Ouedraogo said that the country’s new leaders would work to establish a calendar “acceptable to everyone” for holding new elections without giving further details.

After the televised announcement, crowds took to the streets, cheering and honking car horns in support of the takeover. People hoped that the coup would ease the devastation they have endured since jihadist violence spread across the country.

“This is an opportunity for Burkina Faso to regain its integrity. The previous regime sunk us. People are dying daily. Soldiers are dying. There are thousands of displaced,” said Manuel Sip, a protester in downtown Ouagadougou. The army should have acted faster in ousting the president, he said.

After the overthrow of strongman Blaise Compaore in 2014, several people told the AP they no longer cared if they had a democratically elected leader. They just wanted to live in peace.

The communique read aloud on state broadcaster RTB was signed by the country’s apparent new military leader, Lt. Col. Paul Henri Sandaogo Damiba. He sat beside the spokesman without addressing the camera during the announcement.

United Nations Secretary-General Antonio Guterres called on coup leaders to lay down their arms. He reiterated the U.N.’s “full commitment to the preservation of the constitutional order” in Burkina Faso and support for the people in their efforts “to find solutions to the multifaceted challenges facing the country,” U.N. spokesman Stephane Dujarric said.

The U.N. chief said the military takeover was part of “an epidemic of coups around the world and in that region.”

The U.S. State Department in a statement expressed deep concern about the dissolution of the government, suspension of the constitution and the detention of government leaders. “We condemn these acts and call on those responsible to deescalate the situation, prevent harm to President Kaboré and any other members of his government in detention, and return to civilian-led government and constitutional order,” spokesperson Ned Price said.

In a statement, Kabore’s political party accused the mutinous soldiers of trying to assassinate the president and another government minister and said the presidential palace in Ouagadougou remained surrounded by “heavily armed and hooded men.”

The coup “is a signal of frustration and exasperation on the heels of a growing struggle to stem the threat of militants, cope with the degraded security structure, and an attempt to restore faith in the institution of the military,” said Laith Alkhouri, CEO of Intelonyx Intelligence Advisory, which provides intelligence analysis.

Gunfire erupted early Sunday when soldiers took control of a major military barracks in the capital. In response, civilians rallied in a show of support for the rebellion but were dispersed by security forces firing tear gas. On Monday, groups of people celebrated again in the streets of the capital after reports of Kabore’s capture.

Kabore was elected in 2015 after the popular uprising that ousted Compaore. Kabore was reelected in November 2020, but frustration has been growing at his inability to stem the jihadist violence. Attacks linked to al-Qaida and the Islamic State group have killed thousands and displaced more than an estimated 1.5 million people.

The military has suffered losses since the extremist violence began in 2016. In December, more than 50 security forces were killed and nine more died in November.

Mutinous soldiers told the AP that the government was out of touch with troops. Among their demands are more forces in the battle against extremists and better care for the wounded and the families of the dead.

About 100 military members have planned the takeover since August, according to one of the mutinous soldiers.

The West African regional bloc known as ECOWAS said in a statement that it was following events in Ouagadougou with “great concern.” The bloc has already suspended Mali and Guinea over military coups. Those coup leaders appear in no hurry to return their countries to civilian rule.

Burkina Faso has also seen its share of coup attempts and military takeovers, although it experienced a period of relative stability under Compaore, who ruled for 27 years until his ouster in 2014.

In 1987, Compaore came to power by force. And in 2015, soldiers loyal to him attempted to overthrow the transitional government put into place after his ouster. The army was ultimately able to put the transitional authorities back in power, who led again until Kabore won an election and took office.

___

Associated Press writers Krista Larson and Carley Petesch in Dakar, Senegal, and Edith M. Lederer at the United Nations contributed to this report.