NAIROBI, Kenya — Militants detonated a deafening car bomb at the gates of a popular hotel in Somalia on Wednesday evening, and gunmen then stormed the hotel, leaving at least 15 people dead and creating a fiery scene of wrecked cars, crumbled buildings, panic and smoke that stretched for blocks in the heart of Mogadishu, the capital.
The Somali authorities said government forces were battling room to room in the hotel, the Ambassador, against a few heavily armed men. A spokesman at a hospital said more than 40 people had been wounded in the attack.
The Shabab, a Somali militant organization that has attacked several other hotels in similar fashion, claimed responsibility for the assault.
Somalia has been increasingly violent. After years of retreats and defeats, the Shabab have been stepping up attacks on civilians, peacekeepers and Somalia’s fledging security forces; the group has killed hundreds of people this year.
Analysts say one reason may be that the Shabab, an offshoot of Al Qaeda, are competing with the Islamic State and are desperate to demonstrate their militant prowess. At the same time, Somalia’s government and its Western allies, including the United States, have gone on the offensive, increasing the frequency of their strikes against militants.
In March, the United States killed about 150 Shabab fighters in airstrikes on a training camp; the attack was one of the deadliest single assaults in recent Somali history.
On Wednesday, Somali officials said government commandos had recently killed several top Shabab operatives, including the suspected planner of anattack on a Kenyan university last year that killed nearly 150 people.
There were also reports that the Shabab operatives had been killed by an American helicopter strike.
A growing number of United States Special Operations troops are based in Somalia; American officials have said the troops’ primary role is to train and assist the African Union and Somali forces fighting the Shabab.
The Ambassador, the hotel attacked on Wednesday, is popular with government officials and is on a busy street lined with sidewalk cafes, a relatively new phenomenon in Mogadishu. Two Somali lawmakers have been confirmed dead, and the authorities said the death toll could rise.
“I am scared,” said Abdulkadir Hassan, who owns a printing shop nearby and witnessed the attack. “Just in minutes, the area was overwhelmed by heavy smoke, flying shrapnel and a firefight.”