Witnesses told the BBC that gunmen opened fire and detonated the bomb on a busy main road.
Many others were injured, most of them civilians.
It is not clear who was behind the blast, but the Islamist militant group al-Shabab has carried out several attacks on the same road in the past few weeks.
Witnesses said Saturday's attack began when gunmen opened fire on a Somali government official's car, sparking a gun battle with his security escort.
"There was a drive-by shooting attack... then a car loaded with explosives was detonated after police reinforcements arrived," a police official told AFP.
"The gunmen riding in a car attacked the official and there was [an] exchange of gunfire... then there was a huge blast," said Abdi Mudey, who was near the scene.
Witnesses described seeing part of a supermarket and several cars destroyed by the blast.
Husayn Ali Wehliye, a regional governor, escaped with minor injuries, local media reported.
Al-Shabab ruled much of Somalia until 2011, when it was driven out of Mogadishu by African and Somali troops.
Three people have been killed in a gun and bomb attack in the Somali capital Mogadishu.