BAMAKO, Mali (AP) — Mali’s military has released the transitional president and prime minister from detention, a top officer said Thursday.

The release of President Bah N’Daw and Prime Minister Moctar Ouane came after they resigned Wednesday in the presence of international arbitrators who are in the West African nation to mediate the political crisis, according to Maj. Baba Cisse.

The U.N. Security Council said Wednesday after a closed meeting that the resignations were forced and demanded an immediate resumption of the civilian-led transition and said the military should return to their barracks.

The U.N., the African Union and other international bodies, as well as the U.S., had also urged Mali’s military to release the transitional leaders.

N’Daw and Ouane were arrested Monday, along with other leaders of the transitional government, hours after naming a new Cabinet that did not include two key military leaders.

By deposing the two transitional leaders, the head of Mali’s 2020 coup, Col. Assimi Goita, who has been serving as the transitional vice president since September, regained control of the West African country.

The political crisis in the midst of an 18-month civilian transition to democratic elections following the 2020 coup risks plunging the troubled nation into further instability and has sparked international condemnation.