Reuters news agency said al-Shabab fighters claimed responsibility for Tuesday’s attack.
Al Jazeera has learned that at least 10 people, including government soldiers, died in the attack and 20 others were injured.
Witnesses and social media users reported hearing a loud explosion in Mogadishu, followed by gunfire.
“There was a blast close to the SYL Hotel area, near the main checkpoint of the presidential palace,” said Ibrahim Mohamed, a security officer.
Images posted to social media showed huge plumes of smoke rising above the president’s palace.
Al-Shabab fighters have claimed responsibility for several recent explosions in Mogadishu, including a car bomb and gun attack last week at a popular beach restaurant that killed 10 people.