A Somali police officer says at least three people have been killed after gunmen stormed two hotels in the Somali capital.

Capt. Mohamed Hussein said that suspected Islamic militants entered the Siyad hotel, which is located opposite the presidential palace, as well as Weheliye hotel on Makka Almukkaramah Road, as hotel residents were starting to break the Ramadan fast on Friday evening.

Hussein said that Somalia's security forces intervened shortly after the assault began, engaging in a firefight with the gunmen.

There was no immediate claim of responsibility for the attack, but Somalia's Islamic extremist rebels al-Shabab has vowed to step up attacks during the Muslim holy month.