Mali's constitutional court named Colonel Assimi Goïta as its transitional president on Friday.
Mali: Coup leader Col Goïta named as transitional president
It comes after Mali's second coup in nine months.
Colonel Goïta had already declared himself the interim president on Wednesday.
On Monday President Bah Ndaw and Prime Minister Moctar Ouane, were detained by soldiers along with other leaders of the transitional government, hours after naming a new Cabinet that did not include two key military leaders.
On Thursday, they both resigned and were released. Their arrest led to an international uproar.
The new leader said on Friday his appointment is for security reasons during a meeting with the Malian political class.
"We had to choose between the stability of Mali and the chaos. We have chosen stability. In choosing between disorder and cohesion in the defence forces and security, we have chosen cohesion in the defence forces and security because it is in the nation's best interests," Goïta said on Friday.
"We have no hidden agenda"
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 Goïta, following mass protests over perceived corruption and his failure to quell a bloody jihadist insurgency.
Goïta, who led the junta calling itself the National Committee for the Salvation of the People, has served as Mali's vice president in the transitional government formed last September.
He has held that position despite initial calls from the international community for an entirely civilian-led transition.
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 destabilise the poverty-stricken nation of 19 million people, which has been battling a brutal jihadist insurgency since 2012.