Mali’s President Amadou Toumani Toure, who was toppled by a military coup last month, has formally resigned from his post, the international mediator in the crisis announced Sunday.

Toure’s resignation opens the way for the departure of the junta that ousted him.

For under the terms of a transition deal concluded with the West African bloc ECOWAS late Friday, the junta’s leaders said they in turn would step aside to allow a return to democracy once Toure had formally quit.

The deal also provided for a lifting of sanctions imposed by ECOWAS, which has already been acted on and an amnesty for those involved in the coup.

Under the framework deal, speaker of parliament Dioncounda Traore is to become interim president with the task of organising elections, if possible within 40 days.

But he also has to contend with the uprising in the northern half of the country — where Tuareg fighters and Islamist extremists have taken control.

The Tuareg fighters there issued a declaration of independence Friday that was rejected not just by the international community but their former allies, the Islamist militia.