Police spokesman Sadiq Ali Adan blamed the attack on the local al-Shabab extremist group, which is linked to al-Qaida and often targets Mogadishu with bombings.
The Luul Yamani restaurant also was attacked last year.
At least one building near the restaurant collapsed after the blast, and people were feared to be trapped in the rubble.
The blast occurred at dinner time when the restaurant was full.
Security in Mogadishu had been especially heavy, with thousands of government forces deployed in anticipation of a planned demonstration on Saturday by an alliance of opposition leaders over the country's delayed national election.
The demonstration was later postponed.
Source: AP