It was unclear who was behind the attack.
"A blast occurred at a restaurant near School Policio (police base), we shall give details later," police spokesman Sadik Ali told Reuters in a WhatsApp message.
A witness, shopkeeper Mohamed Ali, told Reuters at least two people were dead from the blast.
"I understand this includes the restaurant owner. Police opened fire after the blast," Ali said, adding that he could see huge clouds of smoke rising above the restaurant and ambulances trying to reach the blast site. Al Qaeda-allied Islamist group al Shabaab frequently carries out bombings in Mogadishu and else where in Somalia as part of its campaign to topple the central government.
The group wants to establish its own rule in the Horn of African country based on its own strict interpretation of Islam's sharia law.