The constitutional court of Mali named the leader of the post-coup junta Col. Assimi Goita as the country's transitional president Friday.
The judgment stipulated that Goita would "exercise the functions of transitional president to lead the transition process to its conclusion," following his seizure of power this week.
The constitutional court said it had made the decision due to the "vacancy in the presidency" following the resignation of caretaker President Bah Ndaw.
Soldiers detained Ndaw and Prime Minister Moctar Ouane on Monday, before releasing them Thursday after they resigned.
But the twin arrests triggered a diplomatic uproar – and marked the second apparent coup within a year in the unstable country.
Ndaw and Ouane had led a transitional government tasked with steering the return to civilian rule after a coup last August that toppled Mali's elected president, Ibrahim Boubacar Keita.
Keita was forced out by young army officers, led by Goita, following mass protests over perceived corruption and his failure to quell a bloody insurgency.
Goita had originally been named vice president with other key posts given to fellow army officers.
Earlier Friday, Goita explained that the army had had little choice but to intervene.
"We had to choose between disorder and cohesion within the defense and security forces and we chose cohesion," he said.
He added that a new prime minister will be appointed within days, in his first remarks since seizing power this week.
The army officer made the announcement during a meeting with political and civil society figures in Bamako, according to an Agence France-Presse (AFP) journalist, as international pressure rises on the country's ruling military administration.
"In the coming days, the prime minister who will be appointed will carry out a broad consultation between the different factions," Goita said.
He asked those attending the meeting to support his preference of a prime minister from the opposition M5 movement, a once-powerful group which the military sidelined after the August coup.
"Either we accept joining hands to save our country, or we wage clandestine wars and we will all fail," Goita said.
The transition government – installed under the threat of regional sanctions – had the declared aim of restoring full civilian rule within 18 months.
Ndaw and Ouane's detention came hours after a government reshuffle that would have replaced the defense and security ministers, both of whom were army officers who had taken part in the August putsch.
Political turmoil in Mali has worried the country's neighbors, which have led efforts to defuse the crisis.
Diplomats told AFP Friday that the Economic Community of West African States would discuss the situation in Ghana's capital Accra on Sunday.
The 15-nation bloc has also warned of reimposing sanctions on the country as has the United States and former colonial master France.
There are nonetheless fears that sanctions will further destabilize the poverty-stricken nation of 19 million people, which has been battling a brutal insurgency since 2012.
Several hundred Malians rallied in Bamako during the day to voice their support for the colonels, with many of them voicing hostility to France and calling for stronger ties with Russia.
Russia's foreign ministry, for its part, on Friday hailed the release of Ndaw and Ouane but pressed Mali to eventually hold "democratic elections."
Goita wants to name an M5 member as prime minister, in a move some say could relieve pressure on the military.
M5 spearheaded protests against Keita in 2020 but was excluded from key posts in the army-dominated post-coup administration.
A rapprochement with the group might serve to soften domestic and foreign criticism of the military.
The International Crisis Group has said that an M5 prime minister could allay international concerns.
The M5 itself appears willing to work with the army.
The group's spokesperson, Jeamille Bittar, told a news conference Friday that M5 would put forward one of its cadres, Choguel Maiga, as prime minister.
"We must all come together around the new government," he said.
In Bamako, there has been almost no opposition to the military's latest power play. Most have wearily accepted its role in politics.
Some have even welcomed it. Several hundred people rallied in support of the army in a central square of the city on Friday, for example, with many toting portraits of Goita.