The decision comes after intense fighting in the streets of Mogadishu. But some opposition members and residents were not convinced with the decision.
Somalia's lower house of parliament voted unanimously on Saturday to cancel a two-year presidential term extension that it approved last month after intense violence between security forces in Mogadishu.
Prime Minister Mohamed Hussein Roble ordered the army to return to their barracks following the vote, and urged politicians to avoid inciting violence.
Roble took to Twitter to thank President Mohamed Abdullahi Mohamed for agreeing to not extend the mandate to stay in his position, and said the government would "soon prepare an election plan."
The US embassy, European Union ambassador, and the Turkish foreign ministry said they were satisfied with Saturday's vote.
It is unclear how long it will take for an election to take place. Some opposition leaders had hoped Mohamed would resign and said the parliament's decision did not go far enough.
"[The president] can never be trusted as he flip-flops between his own words in unpredictable or reasonable ways," said Abdirahman Abdishakur, one of the opposition candidates.
Tense times in Mogadishu
Violence broke out last weekend after the lower house of parliament approved President Mohamed's extension. The political crisis raised concerns that al Qaeda-linked al Shabaab militants could exploit a security vacuum if security forces split along clan lines.
Al Shabaab has already taken over at least one town in the past week after heavily armed fighters moved from the countryside into the capital.
President Mohamed's attempt to continue his term also angered foreign donors who have backed his government in an attempt to bring stability to the nation after the civil war broke out in 1991.
The fighting forced between 60,000 and 100,000 people to flee their homes. The streets were calm on Saturday, but the mood was still tense. Some of the displaced were hesitant to return.
"Would you bring your wife and children in the middle of those opposing forces, right in front of and around your house?" asked Mohamed Abdulle Farah, who fled the Hodan district of the capital.
It was not immediately clear if security forces loyal to the opposition would withdraw from their positions, having refused to earlier this week.
Somalia's armed forces include members of clan militias that have battled for power and resources. President Mohamed is Darod, one of Somalia's major clans. Many of the opposition leaders and Somali military in the capital are Hawiye, another large clan.
kbd/aw (AP, Reuters)