At least five people were killed when a car laden with explosives rammed into a cafeteria in central Mogadishu and blew up on Monday, officials and witnesses said.
Bursts of gunfire followed the attack, which targeted the Italian Coffee cafeteria, located near the passport office. A Reuters photographer saw five dead bodies sprawled on the ground at the scene of the blast.
There was no immediate claim of responsibility. The Somali Islamist militant group al Shabaab often carries out attacks in the capital and beyond.
"A suicide car bomb was driven into the cafeteria before exploding. We do not know about casualties yet," Major Aden Ibrahim, a police officer, told Reuters.
Al Shabaab was not immediately reachable for comment.
In recent years, the Al Qaeda-linked group has lost large swathes of its territory to African Union peacekeepers supporting the U.N.-backed government.
But the insurgents frequently launch deadly gun, grenade and bomb attacks in Mogadishu and other regions controlled by the federal government. Many attacks are aimed at military bases but some also target civilians.
Earlier on Monday, three Somali soldiers on a ordnance-clearing mission were killed after a roadside bomb planted by the insurgents exploded 90 km (60 miles) north of the capital.
Somalia has been mired in conflict since 1991, when clan-based warlords overthrew dictator Siad Barre and then turned on each other.