Somali security forces have touted gains made in recent weeks against the al Qaeda-linked group while fighting alongside local self-defense groups.
A weekly selection of opinions and analyses from the Arab media around the world.
The gunmen were holding an unknown number of hostages on the second floor of the building, Mohammed, an intelligence officer, said, preventing authorities from using heavy weapons.
Faced with criticism over massive corruption, restrictions on the media, and abuses of power in his first term, which ended in 2017, Mohamud has adopted a conciliatory tone.
Iranian Mohammed Saeid Golabi was arrested in Kenya for coordinating a terror cell in Nairobi attacking both Israeli and local sites.
Al Shabaab, which wants to overthrow the government and impose its own strict interpretation of Islamic law, confirmed it was behind the attack.
Ugandan troops are part of the African Union peacekeeping mission in Somalia, whose aim is to support the central government and stop al Shabaab's efforts to topple it.
Turkey has been a major source of aid to Somalia following a famine in 2011 as Ankara seeks to increase its influence in the Horn of Africa.