At least nine people were killed and 10 injured when Islamic extremists attacked a hotel in the Somali capital Mogadishu.

The attack started at dawn when a suicide bomber detonated a vehicle laden with explosives at the gate of the Sahafi Hotel and then gunmen on foot shot at people in the hotel, Captain Mohamed Hussein said.

There was a secondary explosion outside the hotel that is suspected to have come from car bomb parked by the building.

"They have killed the owner of the hotel, a former military general, and other officials during the attack," Capt Hussein said.

"There's a hostage situation inside the hotel."

Al-Shabab, the Islamic extremist rebels waging an insurgency against Somalia's weak UN- backed government, claimed responsibility for the attack through the group's radio Andulus.

The fighters infiltrated the hotel and are still in control of the building, Sheikh Abdiaziz Abu-Musab, al-Shabab's military spokesman, told the radio station.

Somali troops and African Union forces were at the scene of the attack, according to the African Union Mission in Somalia, which has deployed troops to bolster Somalia's government against al-Shabab's insurgency.

The hotel is often frequented by Somali government officials and business executives and it has been targeted before.

Two French security advisers were abducted from the hotel by militants in 2009.

Despite being forced out of Mogadishu and many other cities and towns across Somalia, al Shabab continues to launch lethal attacks in the capital and elsewhere.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.