The decision to suspend the decision was made by President Mohamed Abdullahi Mohamed on Monday, according to the news agency Reuters.
In recent days, the two men have been arguing about, among other things, the delayed and fragile election process in the conflict-ravaged country.
"The president has decided to suspend Prime Minister Mohamed Hussein Roble and revoke his powers because he has links to corruption," he said in a statement.
Prime Minister: "Outrageous"
Mohamed Abdullahi Mohamed, also known as "Farmajo", accuses the Prime Minister of having been involved in an investigation into land acquisition.
In a statement on the Roble Office's Twitter account, the president's statement was called "outrageous", according to Al Jazeera.
Roble claims that the president's attempt to "militarily take over" the prime minister's office is against the law.
The relationship between the two has been frosty for months.
Last Sunday, they accused each other of postponing the parliamentary elections, according to Reuters.
SVT's Africa correspondent Johan Ripås says that Prime Minister Roble has pressed for elections to be held in Somalia - but the president has held back.
- Several international assessors believe that there is a risk that the president is in the election process and trying to influence, says Ripås.
Graduated in Stockholm
The federal government in Somalia is weak and the country has not had a truly free and democratic election since the outbreak of civil war in 1991.
Indirect parliamentary elections were supposed to be held in 2020 but were postponed due to power struggles between the federal government and a number of states.
This spring, Parliament extended the president's term by two years, leading to violent protests.
The situation calmed down somewhat when a timetable for the election process was presented, parliamentary and presidential elections were to begin in July.
But they too were postponed.
In November, however, the indirect elections to the lower house of parliament began.
Mohamed Hussein Roble is a Swedish citizen and came to Sweden in 1992. In 2000, he took a master's degree in environmental technology and sustainable infrastructure at KTH in Stockholm.