Fighting had continued into Friday morning after soldiers from the national guard stormed a police station where Finance Minister Suleimane Seidi and the secretary of state for the treasury, Antonio Monteiro, were detained after their arrest on Thursday night.
Seidi is a member of the former ruling PAIGC party, which leads the coalition that won a majority in legislative elections in June.
That result halted President Umaro Sissoco Embalo's plans to push through a constitutional change that would have allowed him to consolidate power by removing the country's semi-presidential system. The PAIGC is opposed to this.
The national guard reports to parliament, while the military reports to the president.
The move to free the men took place on Thursday night under the auspices of the head of the national guard, Victor Tchongo, the army said in a statement.
Gunshots were heard throughout the night in various parts of Bissau and residents woke up to military road blocks. Most of that deployment was cleared by midday and street life went back to normal.
"Republican forces have restored constitutional order," the army said, calling on businesses to open and citizens to resume their daily activities.
Embalo is away in Dubai attending the COP28 climate summit. His communications team said the presidency had "nothing to do with it."
Tchongo, who was arrested earlier on Friday, has been freed, while Seidi and Monteiro are back in custody, a police source said.
They are under arrest over 6 billion CFA francs ($9.95 million) allegedly disbursed from public coffers without permission.
Neither have made any public comments in the chaotic hours after they were arrested, freed and then detained again. During that time, the home of the leader of PAIGC also came under fire from unidentified attackers, according to police sources.
Guinea Bissau, a West African nation of around 2 million inhabitants that sits between Senegal and Guinea, has seen frequent turmoil since it gained independence from Portugal in 1974.
There have been at least 10 coups or attempted coups, and only one democratically elected president has completed a full term in almost four decades.
At least six people were killed during a failed attempt to overthrow Embalo in February 2022.
The events in Bissau follow a spate of coups in a region that had been making strides toward shedding its reputation for military-led takeovers. Overall there have been eight coups in West and Central Africa in the last three years.
Sierra Leone's government foiled an attempt to overthrow it over the weekend. More than 20 people were killed as gunmen in the capital Freetown attacked military barracks, a prison and other locations on Sunday, freeing about 2,200 inmates.
Forum