“We assisted 48 wounded people and carried 16 others who were killed in the blast,” said Abdikadir Abdirahman Adem, director of Mogadishu’s AMIN ambulance service.
Mogadishu residents described a huge blast that could be heard across the city and a plume of smoke that rose above the skyline.
A spokesman for the city administration, Abdifatah Omar Halane, confirmed the blast but gave a lower toll of “nearly 10” killed. He said investigations were underway.
The Al-Qaeda aligned Shabaab militant group claimed responsibility in a statement distributed on its Telegram messaging account.
It said the target was a military base close to the port and claimed to have killed “nearly 30”. The group frequently exaggerates the number killed in its attacks.
The Shabaab is fighting to overthrow the internationally-backed government of Somalia and regularly stages deadly attacks on government, military and civilian targets in the capital and elsewhere in the war-torn country.
The attack took place close to the entrance to Mogadishu’s port.
“The bomber targeted a civilian area, there were porters and other small scale traders in the area when the blast occurred,” said Ibrahim Mohamed, a senior police officer.
The attack comes as Somalia is in the process of electing a new government with the much-delayed presidential vote due on December 28.