A man described as the leader of a group of soldiers who tried to free a detained minister and a senior state official in Guinea-Bissau has been caught, the military says.
Heavy gunfire was reported in the capital on Friday morning.
Members of the National Guard had taken the officials before seeking refuge in barracks south of the city.
Special forces then intervened after attempts to negotiate failed, resulting in an exchange of gunfire.
Calm is said to have been restored later.
The “situation is completely under control”, the AFP news agency quotes an army spokesman as saying.
Finance Minister Souleiman Seidi and António Monteiro, the secretary of state for the treasury, had been detained amid investigations into the alleged irregular withdrawal of $10m (£8m) of state funds.
They were questioned on Thursday afternoon by an anti-corruption inquiry to clarify the payments to 11 companies.
In a parliamentary session on Monday, the leader of the country’s main opposition party alleged that the owners of the companies were close to leaders of the country’s governing coalition.
Mr Seidi defended the payments as legal.
On Thursday after the questioning, Mr Seidi and Mr Monteiro were arrested and detained so as not to jeopardise the investigations, local media said.
National Guard soldiers later in the evening invaded the police cells, located near Bandim market, “with AK-47 weapons and bazookas” and extricated the detained officials, the privately owned O Democrata news outlet reported.
It said the National Guard took them to an unknown location.
President Umaro Sissoco Embalo is currently out of the country, attending the UN’s COP28 climate conference in Dubai.
On Friday morning, regional stabilisation forces deployed by the regional West African bloc Ecowas were seen patrolling the streets, the AFP news agency reported.
Guinea-Bissau has suffered a series of coups and attempted coups since gaining independence from Portugal in 1974.
In February last year, the president said he survived a coup attempt after being under heavy gunfire for five hours – in an incident in which 11 people died.
Without providing details, he said the attack was linked to drug trafficking in the country.
Some however doubted the official version of the events, amid questions including who was really behind the attempt, how many people were involved and who was in command.
Talking to the BBC’s Newshour programme, Alberto Dabo, a journalist in Bissau, directly linked the recent events to what happened last year.
“After the coup attempt, many high-ranking officials of the army who were held responsible for that are in jail without any judgement. And some high-ranking members of the army are demanding their liberation,” he said.