In an interview with Reuters news agency, police officer Major Musa Ali placed the death toll at 29.
At least 80 others were injured in the attack on Thursday near Hotel Maka al-Mukarama and a judge’s residence on a busy street in Mogadishu, according to the police commander.
Heavy gunfire was heard across the Somali capital through the night on Thursday, and it continued as Friday dawned.
AFP news agency, however, said the fatalities were at least 10, quoting Abdirahman Ali, a Somali national security officer.
Al-Shabab’s military spokesman claimed that they still control the hotel.
“The government tried three times to enter the building but we repulsed them. We still control the hotel,” Abdiasis Abu Musab, al-Shabab’s military Spokesman, told Reuters.
Many victims of Thursday’s attack suffered horrific injuries and hospitals were said to be struggling to cope with causalities.
Some of the wounded lost limbs, Sadiya Yusuf, a nurse at Daru Shifa, one of the hospitals treating victims, told AP news agency.
The Maka al-Mukarama hotel is frequently patronised by government officials, and al-Shabab has targeted it multiple times in past attacks that have killed scores of people.
Reuters witnesses saw frantic residents in the city searching for missing relatives through the night, making countless phone calls to find out if anyone had seen their family members.
“I have been running to and fro from blast scene to hospitals since yesterday evening in search of my husband and brother who were selling a shop at the place where the blast took place. I have just seen them in hospital, they are in critical conditions. My husband lost his stomach and my brother suffered severe wounds to both arms,” Halima Omar, a mother of three children told Reuters.
Somalia has been convulsed by lawlessness and violence since 1991 but has stabilised somewhat in recent years.
The armed group has been fighting to dislodge a Western-backed government protected by African Union-mandated peacekeepers.
The US has dramatically increased air attacks against al-Shabab since President Donald Trump took office.
The US military command for the African continent reportedly carried out 50 raids in Somalia in 2018.
This year, the US raids targeting al-Shabab fighters have been coming more frequently.
The military command in Africa reported 23 raids as of Tuesday, including one in central Somalia that killed 20 fighters and another the day before that killed 35.