FREETOWN, SIERRA LEONE -- Sierra Leone's president declared a nationwide curfew Sunday after gunmen attacked the military's main and largest barracks in the West African nation's capital and then overran detention centres, including a major prison.

The attack raised fears of a breakdown of order amid a surge of coups in the region. In recent years, a string of west and central African countries have experienced military coups. This year alone, the governments of Niger and Gabon were overthrown by military factions, and there were attempts in Burkina Faso and Sudan, the latter of which has descended into civil war.

The detention centres, including the Pademba Road Prisons -- holding more than 2,000 inmates -- were attacked just as security forces fought to restore calm during sustained shootouts at the Wilberforce military barracks, according to Information Minister Chernor Bah.

"The prisons were overrun (and) some prisoners were abducted by the assailants while many others were released," Bah said. Security forces managed to "push back" the assailants to the outskirts of the city where fighting continues, he added.

Sierra Leone's President Julius Maada Bio earlier declared a nationwide curfew in response to the attacks.

An Associated Press journalist in the capital said that gunshots were still heard in the city hours after the government assured residents of calm, although it wasn't clear who was behind the exchange of fire, nor if any arrests were made.

"The security forces are making progress in the operation to defeat and apprehend those responsible for today's attacks," Bah said. "The government remains in control and on top of the situation."

The president and the country's Ministry of Information and Education also both said that the government and security forces are in control of the situation, trying to dismiss fears of a possible escalation of violence in the country whose population of 8 million people is among the poorest in the world, having some of the lowest scores on the U.N. Human Development Index.

No details were immediately given about the gunmen or the reason for the attack, which comes months after Bio was reelected for a second term in a disputed vote in which the main opposition party accused the electoral commission of rigging the results.

Videos posted online showed soldiers patrolling Freetown's empty streets and captured the loud blasts of gunshots at dawn. The AP couldn't immediately verify the authenticity of the videos.

West Africa's regional economic bloc ECOWAS -- of which Sierra Leone is a member -- described the incident as a plot "to acquire arms and disturb the peace and constitutional order" in the country. The bloc has in recent months tried to reverse the surge in coups in West and Central Africa, which has recorded eight military takeovers since 2020, the latest in Niger and Gabon this year.

"ECOWAS reiterates its zero tolerance for unconstitutional change of government," the bloc said in a statement.

Bio was reelected in Sierra Leone's fifth presidential election since the end of a brutal 11-year civil war -- more than two decades ago -- which left tens of thousands of people dead and destroyed the country's economy.

He continues to face criticism because of debilitating economic conditions. Nearly 60% of Sierra Leone's population is facing poverty, with the youth unemployment rate being one of the highest in West Africa.

Two months after Bio won the disputed vote, police said they arrested several people, including senior military officers planning to use protests "to undermine peace" in the country.

A protest against the government in August last year resulted in the deaths of more than 30 people, including six police officers.

------

Chinedu Asadu reported from Abuja, Nigeria.