Six people were killed Friday in a blast at a beachside Mogadishu restaurant, which was hosting Somalia's police chief and legislators when the explosion occurred, an ambulance service said.
The government officials were unharmed in the blast which sparked a fire inside the building, sending smoke into the sky as diners scrambled to safety.
"There was a blast in the restaurant presumably caused by a suicide bomber, but we are not sure so far (about)... the cause," police officer Mohamed Ali said.
"The police commissioner was inside the restaurant when the blast occurred but he is safe (as are) several legislators who stayed there," he told AFP.
"Six people died and seven others were wounded in the blast," Abdikadir Abdirahman, director of the Aamin Ambulance service, told reporters.
The explosion was followed by sporadic gunfire, said Farah Dahir, a diner at a nearby restaurant.
"I can see several ambulances rushing (to) the scene now, but it is very difficult to know about what exactly happened, the whole area is sealed off by police now," he told AFP.
The explosion came days after a mortar attack targeted Somalia's parliament during a meeting by newly-elected lawmakers.
No lawmakers were harmed in Monday's assault, which was claimed by the Islamist militant group Al-Shabaab that has been waging an insurgency against the central government for more than a decade.
The Horn of Africa nation has seen a spate of attacks in recent weeks as it hobbles through a long-delayed election process to pick a new president.
Some parliamentary seats remain unfilled but sufficient lawmakers have been sworn in to move the election process forward, with both houses due to choose a speaker next week.
Somalia has not held a one-person, one-vote election in 50 years.
Instead, polls follow a complex indirect model, whereby state legislatures and clan delegates pick lawmakers for the national parliament, who in turn choose the president.
The election delays have worried Somalia's international backers, who have warned that the chaos distracts from the fight against Al-Shabaab.
The Al-Qaeda-linked militants frequently attack civilian, military and government targets in Somalia's capital and outside.
The jihadists controlled Mogadishu until 2011 when they were pushed out by an African Union force, but still hold territory in the countryside.
Go to video
Ethiopia thwarts Shebab attack on its Somali border
Somalia’s economic potential under the spotlight
Somalia reverts to direct vote, presidential rule
Go to video
Somalia: Shebab attack on African Union military base
Somalia's Puntland holds 'historic' local polls
Over 210,000 displaced by flooding in central Somalia