Gunfire could be heard inside the Maka-Mukarramah Hotel, but it was not clear if any gunmen had managed to penetrate the hotel's gate, said Somali police Capt. Mohamed Hussein. He said there was no information yet on casualties and it was not clear who was being targeted.
The Somali militant group al-Shabab routinely carries out suicide bombings, drive-by shootings and other attacks in Mogadishu, the seat of Somalia's Western-backed government.
The militants have continued to launch attacks in Mogadishu despite being ousted from their bases in the seaside city in 2011.