The explosion near a checkpoint outside the Afrik Hotel reverberated throughout the city, and sent a massive plume of black smoke into the air.
Abdullahi Ahmed, a security officer who witnessed the blast, said at least five people were killed in the attack, which appeared to be targeting the hotel.
"I can confirm the death of five people: three civilians and two government security officers at the checkpoint," he told AFP.
"The area was relatively dense with bystanders and some were killed and wounded in the blast, but we don't have the exact number of casualties."
Other witnesses describing being knocked to the ground by the force of the blast, which damaged nearby buildings.
"I was not very far away from where the blast occurred, and I could see several people lying (on the ground), some of them dead with a pool of blood," said one, Abdikarim Mohamed.
"The blast was huge. It did damage to several nearby buildings."
Suado Ali was walking out of a travel agency when the shockwave knocked her flat.
"I was forced to the ground by the shockwave. I saw nearly ten people lying on the ground, some motionless and others screaming for help", he told AFP.
The attack comes just over a week after 26 people were killed and 56 injured in a 12-hour attack by Al-Shabaab jihadists on a popular hotel in the southern Somali port city of Kismayo.
A suicide bomber rammed a vehicle loaded with explosives into the Medina hotel on Friday before several heavily armed gunmen forced their way inside, shooting as they went.
That attack was the latest in a long line of bombing and assaults claimed by Shabaab, which has fought for more than a decade to topple the Somali government.