At least seven Somalis were killed when a remote-controlled bomb aimed at a United Nations convoy tore through cars and tea shops just outside the capital's international airport on Thursday.
Somali Islamist militant group al Shabaab claimed responsibility for the attack, which damaged one UN vehicle. A UN official said none of its staff were hurt.
Four men who were part of a private security escort for the UN convoy suffered minor injuries, the official said. The Twitter account of the UN in Somalia said the four were Somali nationals.
The strike, one of several in recent weeks, was a further reminder of the threat still posed by the rebels after African peacekeepers pushed them out of the capital to the south of the country in 2011.
Somalia's fragile government is struggling to impose any sense of order more than two decades after the fall of dictator Mohamed Siad Barre tipped the country into chaos.
"A car laden with explosives was remotely exploded in front of a tea shop just outside the airport," senior police official Colonel Abdikadir Ahmed said.
Apart from the seven people killed, at least 15 were wounded, Ahmed said. It was not clear if that included the Somalis escorting the UN convoy.
Striking at will
Smoke blanketed the area and charred human remains could be seen near a burnt car, a Reuters photographer said. Ambulances carried away the dead and injured.
Al Shabaab said the blast was carried out by a suicide bomber, and that "three UN white men" – a reference to foreigners – were killed in the blast along with 13 Somali soldiers guarding the officials.
Mogadishu's heavily-guarded airport, which is often compared to the Green Zone in Baghdad, has several safety perimeter fences and checkpoints, and houses the newly-built British embassy along with a large UN compound.
Many diplomats live in Nairobi as it is not safe to stay in Mogadishu, and when they visit Somalia do not venture outside the airport.
Gunmen used a car bomb to blow a hole in the UN compound's wall nearby last year and the ensuing firefight killed 22 people, including UN staff.
One Western diplomat said the nature of the attack showed security remained a major problem in the capital, where al Shabaab the previous night fired mortar rounds at the presidential palace.
"It shows (al Shabaab) can strike at will, including right in front of the airport," the diplomat said of the car bomb.
"We expect more attacks."