Capt Mohamed Hussein said some attackers had moved to the second floor and were using machine guns to resist security forces.
Police said the attack on the Nasa-Hablod hotel in Mogadishu began when a suicide bomber detonated an explosives-laden vehicle at its gate. Gunmen fought their way inside, and a witness said they began shooting randomly at hotel guests.
Hussein said security forces have killed two of the attackers.
It was not known how many attackers entered the hotel, nor how many guests were inside.
Also Read
The attackers "took positions behind blast walls and sandbags; fighting is still ongoing," Hussein said, as gunfire could be heard in the background.
A witness, Ali Mohamud, said the attackers randomly shot at guests. "They were shooting at everyone they could see. I escaped through the back door," he said.
Yusuf Ali, an ambulance driver, told The Associated Press that he evacuated 11 people injured in the attack to hospitals.
There was no immediate claim of responsibility for the attack. The Somalia-based, al-Qaeda-linked al-Shabab extremist group has been waging a deadly insurgency across large parts of Somalia and often employs suicide car bomb attacks to penetrate heavily fortified targets in Mogadishu and elsewhere.
In early June, an overnight siege by extremist gunmen at another hotel in the capital killed least 15 people, including two members of parliament. Al-Shabab claimed responsibility for that attack.
The latest attack comes during the Muslim holy month of Ramadan, during which extremists often step up attacks in this volatile East African country.