Sierra Leone has been placed under a nationwide curfew after armed men broke into prisons, setting inmates free.
Detainees from a number of “major” facilities were released on Sunday morning, said the West African nation’s information minister.
President Julius Maada Bio later said most of the leaders behind the attack had been arrested.
In a televised address, he described the events as a “breach of security” and an attack on democracy.
He carefully avoided calling them an attempted coup.
He said calm had been restored but gave no details about who the perpetrators were or what they wanted.
The political situation in Sierra Leone has remained tense since June, when President Bio was re-elected – narrowly missing out on the need to have a run-off.
International observers have condemned inconsistencies and a lack of transparency in the count, as well as acts of violence and intimidation.
After the attack, the Ministry of Information declared an immediate curfew. Residents across the country are “strongly” recommended to stay indoors and flights to and from the nation’s only international airport have been cancelled.
In the morning, the BBC witnessed soldiers in Freetown carrying heavy weaponry in a seized police vehicle and saw others chanting that they planned to “clean Sierra Leone”
It is unclear exactly how many prisoners were released but videos shared on social media show several people fleeing from the area of Freetown’s Central Pademba Road prison.
One video appeared to show popular rapper Boss LAJ, who was imprisoned last year on robbery charges, running free.
The BBC has not been able to authenticate these videos.
In August, a number of soldiers were arrested and accused of plotting a coup against the president.
Eight countries in West and Central Africa are under military rule after a series of coups, including in neighbouring Guinea.
The US, European Union, UK and regional block Ecowas have released statements strongly condemning Sunday’s violence.