According to police officer Abdullahi Aden, the bomb went off near the heavily fortified green zone in the capital of the Horn of Africa nation at about 9 a.m. local time.
A car packed with explosives sped through a security checkpoint in front of the Wehliye Hotel popular with government officials, lawmakers and the city’s elite, and detonated at the security checkpoint to the national assembly headquarters after being fired by police officers, Aden said.
Several people died in the explosion, although police have not announced the exact number of casualties. Heavy gunfire was also heard following the morning rush-hour blast.
It was the second major explosion in the Somali capital in recent weeks.
Al-Shabaab claimed responsibility for that attack through a statement broadcast by Andalus Radio, its mouthpiece channel. CNN has been unable to independently verify this claim.
The insurgent group seeks to turn Somalia into a fundamentalist Islamic state. It has previously claimed responsibility for other attacks in Mogadishu, including a truck bombing in December which killed 85.