A car bomb exploded at the gate of the Africa hotel and was followed by gunfire heard inside, Somali police captain Ahmed Hassan told CNN. The incident occurred around 5 p.m. local time (9 p.m. ET), Hassan added.
Armed men from al-Qaeda subsidiary Al-Shabaab gained access to the building after the car bomb blast at the gate, he said.
According to police, there is an ongoing operation to rescue people from inside the hotel. It is unclear at this time whether there are any victims.
The reason for the attack is also unclear, but Hassan said a top commander was in the hotel during the attack. Other senior military officials and lawmakers were also in the hotel, Hassan said.
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.
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.
Omar Nor reported from Mogadishu and Radina Gigova wrote from Atlanta, Georgia.