Col Goïta (L) brought President Ndaw (C) to power last year but removed him on Monday
Mali's former junta leader Col Assimi Goïta has declared himself the country's transitional president.
He made the announcement after stripping interim President Bah Ndaw and PM Moctar Ouane of their powers.
The two ousted leaders were freed from military detention, where they had been held since Monday in what was seen as Mali's second coup in nine months.
The seizure of power came after a cabinet reshuffle which Col Goïta complained he was not consulted about.
Two army officers involved in the previous coup lost their jobs in the reshuffle.
The situation in Mali today is said to be tense but calm.
Col Goïta said earlier that President Bah Ndaw and PM Moctar Ouane had failed in their duties and were seeking to sabotage the country's transition.
They were arrested hours after the reshuffle and resigned their positions while in detention on Wednesday.
Announcing their release on Thursday, Col Goïta's aide Baba Cissé said, quoted by Reuters news agency, "we have nothing against them".
He added that their whereabouts would be kept secret for their own security.
Col Goïta has said elections will still go ahead next year as planned.
The former leaders' release had been requested by the UN, the African Union, the Economic Community of West African States (Ecowas), the EU and the US.
They had been held at a military camp outside the capital, Bamako, since their arrest on Monday evening.
Ecowas has been insisting on civilian rule
The latest events coincided with a visit by a delegation from Ecowas. Last year, Ecowas threatened sanctions unless a caretaker government under civilian leadership took over from the military.
Now that Col Goïta has effectively torn up that agreement by taking charge, it is not clear what the repercussions will be.
But France, the former colonial power, has threatened EU sanctions against the perpetrators, with President Emmanuel Macron describing it as a "coup within a coup", Reuters reports.
Col Goïta has asked people to go about their business as usual and promises the military is committed to the transitional deal.Why is Mali so unstable?
It is difficult to enact reforms quickly - and the vast landlocked country is poor, with large areas underdeveloped.
A coup in 2012 led to militant Islamists exploiting the chaos and seizing the north of the country.
French troops helped regain territory, but attacks continue as the insurgents have capitalised on the persistent political instability in the region.
This has all led to public confidence waning over the army leaders' ability to tackle the Islamist insurgency that has spilled into neighbouring Burkina Faso and Niger