At least 32 people were killed in a suicide attack carried out by Al-Shabab militants at a popular seaside spot in the Somali capital, a police spokesman said on Saturday.
Abdifatah Adan Hassan said around 63 people were also injured, some of them seriously.
Video footage showed several bodies and injured people in the Abdiaziz district of Mogadishu.
Al-Shabab controls large parts of southern and central Somalia. The group is affiliated with al-Qaeda and has waged a brutal insurgency for nearly 20 years against the UN-backed government in Somalia.
In a statement alleging the attack, al-Shabab said that “politicians, [security] military personnel and employees of various ministries and offices” were among the dead.
The group claims that the number of deaths and injuries is much higher than the numbers released by the police.
A witness told the AFP news agency that people were in a state of panic as “it was difficult to know what was happening because the shooting started right after the explosion.”
Abdilatif Ali said some people tried to take cover on Lido beach, while others tried to flee the scene.
“I saw injured people on the beach. People were screaming in panic and it was difficult to tell who was dead and who was still alive,” she added.
At least five people were responsible for the attack, as Hasan said one of the attackers blew himself up while three others were killed.
One attacker was captured alive, the police spokesman told reporters in Mogadishu.
Moussa Faki Mahamat, chairman of the African Union Commission, described the attack as “horrific”.
The Somali Disaster Management Agency has urged people to donate blood to support injured victims.