People gather at the scene of an explosion at the Weheliye hotel in Mogadishu Friday. Somalia's Shebab militants stormed two hotels in the capital Mogadishu before they were themselves killed in heavy fighting, security forces said. (Mohamed Abdiwahab/AFP/Getty Images)

At least 10 people were killed as gunmen stormed two hotels in the Somali capital of Mogadishu, Somali police officials said Friday.

Suspected Islamist militants entered the Siyad hotel, which is opposite the presidential palace, as well as the Weheliye hotel on Makka Almukkaramah Road, as hotel residents were starting to break the Ramadan fast Friday evening, according to Capt. Mohamed Hussein.

Somalia’s special forces intervened shortly after the assault began, engaging in a firefight with the gunmen, he said. The 10 people killed during the attacks included hotel guests and the gunmen, he said.

The attacks started with suicide car bombings before gunmen fought their way inside the hotels, said Hassan Ali, a police commander in Mogadishu.

The Somali Islamist extremist group al-Shabab, which has vowed to step up attacks during the Muslim holy month of Ramadan, asserted responsibility for the assaults.

Although hotel guards and security forces ended the Weheliye hotel attack soon after it started, the attack on the Siyad hotel lasted more than an hour, according to Hussein.

The wreckage of a burned-out vehicle littered a nearby street, and the facade of the Siyad hotel was pockmarked by bullet holes.

Rescue workers carried wounded victims into ambulances as nervous soldiers fired in the air to disperse a nearby crowd.

Al-Shabab militants have been pushed out of much of the territory they once controlled across the Horn of Africa nation, including Mogadishu. But they remain a lethal threat, carrying out guerrilla attacks on government and civilian targets. The group frequently targets public places believed to be frequented by foreigners as well as bases used by African Union forces.

On Friday, suspected militants also launched mortar attacks on a military base for the African Union forces in Mogadishu, although no casualties were reported, according to police officer Dalmar Haji.