The deadly siege at the African hotel, which injured 10 other civilians, ended after Somali security forces fought militants for eight hours, police spokesman Sadik Aden Ali said early at a news conference on Monday.
The attack began on Sunday afternoon at 5:00 p.m. local time (9:00 a.m. ET) with a car bomb at the gate of the hotel, visited by government officials and politicians.
General Mohamed Nur Galaal – a retired military veteran who once served as defense minister in 1991 – was one of the dead in the attack, according to police.
Dozens of other civilians were rescued by the security forces. Somali President Mohamed Farmaajo and Prime Minister Mohamed Hussein Roble both condemned the attack and offered their condolences to those who lost their loved ones.
“My sincere condolences to the families of the victims of the horrific terror attack in Hotel Africa, including General Mohamed Nur Galal who served his country with courage for more than 50 years,” Roble said on Twitter.
Al-Shabaab claimed responsibility for the attack through a statement broadcast by Andalus Radio, its spokesman channel. CNN has not been able to independently verify this claim.
The hotel is frequented by MPs, politicians and security officials, but not by foreigners. Outside the hotel is the main security checkpoint to the airport and Halane base, which is home to Western missions, including the US Embassy.
The reason for the attack is unclear, but the Somali police captain, Ahmed Hassan, told CNN that a top military commander was in the hotel at the time of the attack. Other senior military officials and lawmakers were also at the hotel, Hassan added.
The United Nations condemned the attack on Monday.
“We are shocked by this reprehensible and pointless attack on a site frequented by innocent civilians, and condemn it in the strongest terms,” James Swan, the Secretary General’s Special Representative for Somalia, said in a statement.
“The United Nations in Somalia offers its condolences to the families of the victims and wishes a speedy recovery for the injured,” he added.
Al-Shabaab has claimed responsibility for the attack through a statement broadcast by Andalus Radio, the mouthpiece channel. CNN has not been able to independently verify this claim.
US forces in Somalia mainly train and advise local Somali forces in the fight against Al-Shabaab. The US military is also conducting air strikes against the group and the local ISIS branch in the country, killing a top al-Shabaab leader in a targeted attack in September.