DAKAR, Senegal — Military officers announced late on Friday that they had taken power in the West African nation of Burkina Faso, in what appeared to be the second coup in eight months to rock a nation struggling to quash growing violence from extremist groups.
As gunfire rang out earlier on Friday and the state television channel went off the air in Ouagadougou, the capital, the president, Lt. Col. Paul-Henri Sandaogo Damiba, who led the previous coup in January, had tried to reassure citizens that he was still in control.
But after a day of uncertainty and chaos, military officers announced on national television that they had ousted Colonel Damiba and that Capt. Ibrahim Traoré was now in power.
In a statement signed by Captain Traoré and read on national television, a representative said that a group of officers had decided to remove Colonel Damiba because of his inability to stem a growing Islamist insurgency in the north and east of the country that has displaced nearly two million people — 10 percent of the population.
“The hazardous choices of Colonel Damiba have progressively weakened our security,” the officer read on television, announcing that the group was suspending the constitution, closing the country’s borders, and setting up an overnight curfew.
It was not possible to confirm whether this group of officers had gained complete control of the government, or the whereabouts of Colonel Damiba.
The turmoil came just eight months after the military seized power in another coup as the country was convulsed by widespread anger at the government’s failure to stop attacks on civilians from violent extremists and to stem rising economic hardship.
Millions of citizens in West Africa, the focus of a recent rash of coups and coup attempts, have become familiar with such seizures of power. There have been six coups in the past two years in countries that stretch in a broken line across the bulge of Africa.
Burkina Faso, a landlocked country of 22 million people and one of the continent’s biggest cotton producers, traditionally prided itself on a national spirit of peace, tolerance and integration. Its name means “the land of upright people.”
But the situation changed after a jihadist uprising in Mali that began in 2013 spread to its neighbors, including Burkina Faso. Armed men began robbing and killing civilians and soldiers, while military and vigilante groups sometimes executed those suspected of working with jihadists. By January, citizens were so unhappy with the country’s direction that many welcomed its new military rulers with joy.
In a post on Facebook before his ouster, Mr. Damiba said there had been a “change in mood among certain elements of the national armed forces.”
That prompted a torrent of online comments from citizens, both in support of the president and condemning him. “The Damiba era is over,” wrote one, Alphonse Marie Guissou.
On Friday, soldiers blocked off roads in Ouagadougou in areas near the presidential palace and where the government administration is based. People on motorcycles and bicycles began arriving at the Place de la Nation and other central areas of the city, cellphones in hand, filming knots of people gathering. Men yelled over each other to make their opinions heard on local media’s live streams, the occasional Russian flag fluttering behind them.
Nicodeme Natama, an office worker who lives in the capital near a military base called Camp Baba Sy, said that he heard an explosion around 4 a.m., thinking at first that it was a rainstorm.
“The second explosion brought reality home,” he said by phone. Then, he added, he began to hear gunfire.
At a monument erected to the memory of Thomas Sankara, Burkina Faso’s most iconic leader, young men staged a small demonstration in favor of the rumored coup. But the conversation soon turned to the role the men thought that France, the former colonial power, was playing.
“We want Russia. We don’t want France anymore,” said one, Omar Ouedraogo. “The youth are jobless. Insecurity is everywhere.”
The remarks mirrored the rhetoric in neighboring Mali, which the French military quit last month after nine years fighting Islamist militants. As the attacks intensified despite the French presence, so did Malians’ condemnation of their military partner.
Although the French have no such presence in Burkina Faso, criticism of the former colonizers has spread throughout the arid region known as the Sahel, much of which has been destabilized in recent years by extremist groups tapping into local grievances.
Many people in Burkina Faso welcomed the January coup, hoping it would help bring change in a nation that, like several of its neighbors, has suffered devastating attacks in recent years. Extremists, vigilantes and soldiers have killed civilians. Nearly two million people have fled their homes, and many more are going hungry.
But that change in government has done little to improve the security situation. On Tuesday, 11 soldiers were killed and dozens of civilians went missing when insurgents attacked a convoy bringing supplies to a town in the country’s north, Djibo, which has lived under a blockade by extremists for month. Earlier this month, at least 35 civilians were killed after a convoy of vehicles hit a roadside bomb.
In fact, under Colonel Damiba, jihadists took control of large new swaths of territory and blockaded key towns, said Abdul Zanya Salifu, a scholar at the University of Calgary who focuses on the Sahel. At the same time, he said, hunger, displacement and the cost of living have all increased, while economic hardship and unemployment continued — all issues that the new administration said it would tackle.
“The justification for the January coup has come back to haunt the coup-makers,” he said.
Oumar Zombre contributed reporting from Ouagadougou.