Four gunmen were killed on Thursday in a shootout with military near a base in the Comoros capital after an opposition presidential candidate, former military colonel Soilihi Mohamed, was arrested, security and military sources said.
The security source said a group of soldiers who were in Moroni prison, accused of attempting a coup last year, broke out of prison on Thursday morning.
Earlier in the day, gunfire was heard near the main military base in the Comoros capital, hours after opposition candidates announced plans to unseat the president whose re-election this week they reject as fraudulent.
The gunfire prompted the U.S. State Department's Bureau of Diplomatic Security to order all its personnel to leave the country.
President Azali Assoumani was declared the winner in Sunday's election with more than 60 percent of the vote, enough to avoid a second-round run-off. Observers from African monitoring missions have said the election lacked credibility.
The 12 opposition candidates said they had set up a body called the National Transition Council, chaired by one of them, Mohamed Soilihi, to remove Assoumani from office.
"The mission of the National Transitional Council is to resolve the post-election crisis, to ensure a peaceful transition, to preserve peace, stability and national cohesion in our country," Soilihi said in a statement broadcast on private-owned radio stations and social media platforms.
A diplomatic source said Soilihi was arrested after releasing the statement, and the military camp came under attack shortly afterwards. A Reuters journalist said shooting could be heard at the camp and stopped after about an hour.
"The Union of the Comoros is experiencing gunfire, political unrest, and infrastructure disruptions. US Government personnel have been ordered to depart the country," the Bureau of Diplomatic Security said in a statement on its website.
In Soilihi's statement, the opposition candidates set an April 3 deadline for the vote to be invalidated. Otherwise they called for civil disobedience and a general strike from April 4.
Observers from the African Union, the Common Market of Eastern and Southern Africa and the African Standby Forces of the East said the voting process was riddled with irregularities that led them to conclude it lacked credibility or transparency.
Assoumani said on Tuesday that anyone wishing to contest the results should do so via legal means.
"I hope that those that are contesting the results will follow the legal channels and wait for the final results to be announced by the Supreme Court," he told Reuters.
Authorities shut down a local newspaper, La Gazette, for publishing a story about the proposed transition council.
Assoumani triggered months of protests last year by extending term limits allowing him to stand for another consecutive term.
His decision particularly angered natives of the island of Anjouan who argue that it is their turn to hold the presidency, traditionally rotated among leaders from the three main islands of the Indian Ocean archipelago.
A former army officer, Assoumani has been in and out of office since taking power in a coup in 1999. He has served as president for 10 of the past 20 years, winning elections in 2002 and 2016.
About 60 women leaders who had marched to the Supreme Court to deliver a letter asking it not to validate the election results were dispersed by police and six of them arrested.
They carried banners that denounced the heads of the military, the electoral commission and the supreme court as being "accomplices of a coup d'etat".