A suicide car bomber on Tuesday targeted a hotel near the Somali presidential palace in Mogadishu, killing 26 people, officials and medical sources said.
The fatalities included up to 15 members of the security forces and six women, according to security and hospital sources.
Bodies were found in the rubble of collapsed buildings, while some wounded succumbed to their injuries in hospital.
More than 50 people were injured.
"Security forces in the area tried to stop the car while firing at it, but the driver was able to pass through several checkpoints before it exploded outside SYL hotel," security official Mohamed Hassan said.
Government officials and civil society representatives were inside the hotel, discussing security policy, said a senior intelligence source, who did not want to be named.
State-run Radio Mogadishu quoted Deputy Defence Minister Mohamed Ali Haga as saying that he and two other ministers sustained minor injuries in the blast.
Haga also said legislators and officials were injured, without giving their number.
Some of the victims were inside the hotel when the vehicle - reportedly a truck - exploded.
The blast hit the SYL hotel, another nearby hotel and other buildings, witness Abdisalan Garan said.
Parts of the SYL hotel were completely destroyed, police officer Mohamed Dahir said.
Photographs from the site showed some buildings as having completely collapsed.
The blast also set vehicles on fire on a nearby road, Radio Mogadishu reported.
Sporadic gunfire was heard after the attack. The Islamist group al-Shabaab claimed responsibility on pro-insurgent radio Andalus.
The SYL Hotel is frequented by diplomats, government officials, foreign nationals and even hosts visiting heads of state. It was already targeted in February and last year in two attacks that left a total of nearly 40 people dead.