Updated

The Mali president resigned Tuesday night after being detained with the prime minister in an apparent coup by mutinied soldiers who surrounded the presidential residence and fired shots into the air.

"Today, certain parts of the military have decided that intervention was necessary. Do I really have a choice? Because I do not wish blood to be shed," President Ibrahim Boubacar Keita said in a statement on state televison announcing his resignation.

It is unclear at this time if the mutinied military have taken control on the government, and who exactly led the coup.

Tuesday's arrests of the government officials followed months of protests calling for Keita to step down.

The rebellion began after soldiers mutinied in the Kati army base, located outside the capitol city of Bamako, stealing weapons from the base’s armory and then detaining senior military officials, the Associated Press reported.

Anti-government protestors reportedly allowed the soldiers to move freely through the streets, cheered them on and set fire to Mali’s justice ministry in the capital.

A man holds a national flag as he celebrates with others in the streets in the capital Bamako, Mali Tuesday, Aug. 18, 2020. Mutinous soldiers detained Mali's president and prime minister Tuesday after surrounding a residence and firing into the air in an apparent coup attempt after several months of demonstrations calling for President Ibrahim Boubacar Keita's ouster. (AP Photo)

A man holds a national flag as he celebrates with others in the streets in the capital Bamako, Mali Tuesday, Aug. 18, 2020. Mutinous soldiers detained Mali's president and prime minister Tuesday after surrounding a residence and firing into the air in an apparent coup attempt after several months of demonstrations calling for President Ibrahim Boubacar Keita's ouster. (AP Photo)

“There is no problem whose solution cannot be found through dialogue,” Prime Minister Boubou Cisse, had said in a communique, urging the soldiers to put down their arms.

FRANCE'S FIRST-EVER ARMED DRONE STRIKE KILLS 7 ISLAMIC MILITANTS IN MALI

The United Nations, along with France who previously colonized Mali, have spent over seven years trying to stabilize the nation that saw a coup in 2012, which enabled an Islamic insurgency to take hold of the nation. The 2012 coup was led by soldiers from the same army base as today’s attacks.

Political chaos which consumed the country Tuesday, led to government officials fleeing their offices as armed rebels stormed government buildings and detained officials, including Finance Minister Abdoulaye Daffe.

Keita, who is supported by France and other Western nations, has reportedly attempted to meet the demands of protestors who started their demonstrations in June.

Today’s actions have been condemned by and the Economic Community of West African States (ECOWAS) – a regional union of 15 West African nations that have mediated Mali’s political discord.

“I strongly condemn the forced detention of President Ibrahim Boubacar Keita of Mali, the Prime Minister and other members of the Malian govt, and call for their immediate release,” leader of the African Union Commission, Moussa Faki Mahamat tweeted Tuesday.

The U.S. and France have also rejected today’s developments in Mali, calling them “unconstitutional.”

13 FRENCH SOLDIERS KILLED IN HELICOPTER COLLISION IN MALI

“The U.S.A. oppose any extra-constitutional change of government, whether by those on the streets or by the defense and security forces,” U.S. State Department special Envoy for the Sahel region, J. Peter Pham also said on Twitter.

Today’s actions are all too familiar for the nation of Mali.

The 2012 coup, led by then Capt. Amadou Haya Sanogo, also involved mutinied soldiers who broke into the Kati army base armory, stole weapons and marched on the capitol.

A French-led military operation ousted Jihadi fighters and later forced Sanogo to relinquish power to a civilian government, who organized the election that Keita won in 2013.

The current government has faced criticism for their inability to staunch an increasing spread of Islamic militants in Mali – including a wave of deadly attacks in northern parts of the country last year, which forced the government to close vulnerable military posts.

UN Secretary General Antonio Guterres has condemned Tuesday’s actions and “demands the immediate and unconditional release” of the Mali president and prime minister.

CLICK HERE TO GET THE FOX NEWS APP

“The Secretary-General reiterates his calls for a negotiated solution and peaceful resolution of their differences,” UN spokesperson Stephane Dujarric said in a statement. “He expresses his full support to the African Union and the Economic community of West African States in their efforts to find a peaceful solution to the current crisis in Mali, including through the good offices of his Special Representative.”

The United Nations Security Council confirmed for Fox News that they will hold an emergency meeting Wednesday to discuss the events in Mali.

The Associated Press contributed to this report.