The deadly siege at the Afrik hotel that injured 10 other civilians ended after Somali security forces fought militants for eight hours, police spokesman Sadik Aden Ali told a news conference early on Monday.
The attack began on Sunday afternoon at 17:00 local time (09:00 ET) with a car bomb attack at the gate of the hotel visited by government officials and politicians.
General Mohamed Nur Galaal – a retired veteran military officer who had previously served as country’s defense minister in 1991 – was among those killed in the attack, according to police.
Dozens of other civilians were rescued by security forces. Somali President Mohamed Farmaajo and Prime Minister Mohamed Hussein Roble both condemned the attack and sent their condolences to those who had lost their loved ones.
“My deepest condolences to the families of the victims of the horrific terrorist attack in Hotel Africa, including General Mohamed Nur Galal, who has served his country with courage for over 50 years,” Roble said via Twitter.
Al-Shabaab claimed responsibility for the attack through a statement issued by Andalus Radio, its mouthpiece channel. CNN could not independently confirm this claim.
The hotel is regularly visited by MPs, politicians and security officials, but not foreigners. Outside the hotel is the main security point for the airport and the Halane base, which houses western missions, including the US Embassy.
The reason for the attack is unclear, but Somali police captain Ahmed Hassan told CNN that a top military commander was inside the hotel during the attack. Other senior military officials and lawmakers were also in the hotel, Hassan added.
The United Nations condemned the attack on Monday.
“We are appalled by this reprehensible and senseless attack on a venue frequently visited by innocent civilians, and strongly condemn it,” said James Swan, a UN special envoy to Somalia, in a statement.
“The United Nations in Somalia expresses its condolences to the families of the victims and wishes the injured a speedy recovery,” he added.
Al-Shabaab claimed responsibility for the attack through a statement issued by Andalus Radio, its mouthpiece channel. CNN could not independently confirm this claim.
U.S. troops in Somalia are mainly training and advising local Somali forces while fighting al-Shabaab. The U.S. military is also carrying out airstrikes on the group and the local ISIS branch in the country, killing a leading al-Shabaab leader in September.