Malian President Ibrahim Boubacar Keita said on Wednesday he was stepping down after his arrest in a military coup, whose leaders pledged to oversee a transition towards a new elected government.
Rebel soldiers arrested Keita on Tuesday after the government faced months of protests over a struggling economy, corruption and an Islamist insurgency that has claimed thousands of lives.
The president and Prime Minister Boubou Cisse were taken into custody and driven to a military base on the outskirts of the capital Bamako.
Keita announced his resignation and the dissolution of the government and national assembly on ORTM state television shortly after midnight on Wednesday.
"If it pleased certain elements of our military to decide this should end with intervention, do I really have a choice?" Keita said, adding he would "submit to it, because I don't want any bloodshed".
Coup leaders appeared on television hours later with a promise of a "reasonable timeline" for holding new elections.
The rebel officers had "decided to take responsibility in front of the people and of history", said Air Force deputy chief of staff Ismael Wague.
Mali's neighbours warned against any unconstitutional transfer of power.
The 15-member Economic Community of West African States (Ecowas), of which Mali is a member, pledged to close land and air borders to Mali and push for sanctions against coup leaders.
United Nations Secretary General Antonio Guterres called for Keita and Cisse to be released. The UN Security Council was to hold an emergency meeting on the coup later on Wednesday.