Sporadic gunfire and explosions continued Monday around the Villa Rose hotel, which is popular with senior officials and parliamentarians and located a few blocks from the offices of President Hassan Cheikh Mohamoud.
"The terrorists are stuck in a room of the building and the security forces are about to put an end to the operation very quickly," added Mohamed Dahir, without specifying who the four victims were.
"Several people were injured, including government officials," added the head of security services.
All roads leading to the neighborhood were blocked by security forces, AFP correspondents noted.
Witnesses had described two strong explosions Sunday evening, marking the beginning of the attack by the shebab of this hotel located in the district of Bondhere and enjoying in principle serious security measures.
On its website, Villa Rose is described as "the safest accommodation in Mogadishu", with metal detectors and a high perimeter wall.
"A group of Al-Shabaab fighters attacked a hotel in Bondhere district tonight (and) security forces are engaged to eliminate them," national police spokesman Sadik Dudishe said in a statement on Sunday.
By Sunday evening, many civilians and politicians had been rescued and evacuated from the area.
"I was near Villa Rose when two strong explosions shook the hotel. There was heavy shooting. The area was cordoned off and I saw people fleeing," said witness Aadan Hussein. Mogadishu.
"I saw several military vehicles with special forces heading towards the hotel, and a few minutes later there was heavy gunfire and explosions," Mahad Yare said.
- Total war -
Shebab, an al-Qaeda-affiliated group that has been trying to overthrow Somalia's central government for 15 years, claimed responsibility for the attack.
The African Union Force in Somalia (Atmis) condemned the attack and "commended" on Twitter "the Somali security forces for their swift response to prevent further casualties and property damage".
This new attack comes as the Somali president, elected in May, has decided to wage a "total war" against the Shebab for three months.
The Somali army, supported by local clans, by the Atmis, and with the support of American air strikes, thus regained control of Hiran province and large areas of Middle Shabelle, in the center of country.
But the insurgents retaliated with a series of bloody attacks, underscoring their ability to strike at the heart of Somali cities and military installations.
On October 29, two cars packed with explosives exploded within minutes of each other in Mogadishu, killing 121 people and injuring 333 others. The deadliest attack in five years in this fragile country in the Horn of Africa.
A triple bombing in central Beledweyne also left 30 people dead, including local officials, in early October and at least 21 guests of a hotel in Mogadishu were killed during a 30-hour siege in August.
The siege raised questions about how Islamist militants managed to reach the closely guarded heart of Mogadishu's administrative district undetected.
Armed checkpoints block roads leading to the area, which also houses a detention center for terrorist suspects overseen by the National Intelligence and Security Agency.
According to the UN, at least 613 civilians have already been killed and 948 injured in violence this year in Somalia, mainly caused by improvised explosive devices (IEDs) attributed to Al-Shabaab. The highest numbers since 2017, up more than 30% from 2021.