At least four gunmen had trapped an unknown number of people inside the building, Capt. Mohamed Hussein told The Associated Press.
Al-Shabab, the al-Qaida-linked Islamic extremist group that has carried out many attacks here, claimed responsibility for the assault on the Maka Al-Mukarramah hotel, which is popular with Somali government officials and foreigners.
The attack started when a suicide bomber detonated his explosives-laden car at the gate of the hotel. Gunmen then quickly moved in, according to Hussein, who said he had counted at least nine bodies at the scene.
It remained unclear who was being targeted by the militants and how many civilians were inside the hotel when the attack was launched.
Al-Shabab routinely carries out suicide bombings, drive-by shootings and other attacks in Mogadishu, the seat of Somalia's Western-backed government often targeting government troops, lawmakers and foreigners.
Al-Shabab controlled much of Mogadishu between 2007 and 2011, but was pushed out of Somalia's capital and other major cities by African Union forces.
Despite major setbacks in 2014, al-Shabab continues to wage a deadly insurgency against Somalia's government and remains a threat in the East African region.
