The president, in a decree, named Abdirahman Omar Osman as the new mayor, replacing Taabit Abdi Mohamed. The president’s office did not give a reason for Mohamed’s dismissal.
Local media reported on Saturday that Mohamed and Prime Minister Hassan Ali Khaire did not get on, but it was unclear whether that was the reason for Mohamed’s removal from the post.
“After deliberation with the prime minister and interior minister, the Somali president appointed Abdirahman Omar Osman as the new mayor,” a statement on the Somali government website said.
Mogadishu residents said security forces had entered the mayor’s office on Saturday night and took control of it. They also closed most roads in the city and they were still blocked on Sunday.
The information minister could not be immediately reached for comment.
Somalia has been mired by security problems since 1991 when war lords toppled dictator Mohamed Siad Barre.
Backed by the African Union force AMISOM, the government is struggling to defeat an Islamist insurgency by the al Shabaab group.
Al Shabaab wants to topple the government and establish its own rule based on its interpretation of sharia law.