Somalia’s Prime Minister, Abdiweli Sheikh Ahmed, has accepted a parliament vote asking him to resign.
In a session on Saturday, 153 members voted to oust Mr Ahmed, with 80 voting for him to stay.
Correspondents say the vote is part of a political battle between Mr Ahmed and President Hassan Sheikh Mohamud which has crippled the government.
Security has improved in the country in recent years but the government remains weak and largely ineffective.
Various armed groups have been battling for control of Somalia since President Siad Barre was ousted in 1991.
The al-Qaeda-linked al-Shabab militant group has been responsible for a string of suicide attacks in Somalia which have left hundreds dead.