Car bomb explodes outside Somali office, six killed
"Our ambulance teams have collected the dead bodies of six people," said Abdiqadir Abdirahman, director of the city's Aamin Ambulance service.
He said 16 others were wounded in the blast.
Police officer Ibrahim Mohamed said a vehicle had rammed a security checkpoint outside the Hodan district headquarters then exploded.
"The blast was huge," he said.
The explosion leveled buildings and left a thick plume of smoke which could be seen across the city.
"It caused a huge blast and there was dust everywhere," said Osman Ali, who was in the area at the time.
Images from the scene showed collapsed buildings -- including a mosque -- with rescue workers and civilians picking through the debris.
The attack was claimed by the Shabaab, an al-Qaeda aligned jihadist group fighting to overthrow the internationally-backed government in Somalia.
Active for the last decade, the militants carry out regular bombings and armed assaults on government, military and civilian targets in the capital.