Four car bombs by Islamic extremists exploded outside a hotel in the capital, Mogadishu, killing at least 20 people and injuring 17, said police.

After the three explosions in front of the hotel, a fourth blast hit as medics attempted to rescue the injured.

The suicide bombs detonated near the perimeter wall of the Sahafi Hotel, which is located across the street from the Somali Police Force's Criminal Investigations Department, said Capt. Mohamed Hussein.

Some of the victims were burned beyond recognition when one car bomb exploded next to a minibus, he said.

Somali security forces shot dead four gunmen who tried to storm through a hole blown into the hotel's wall but did not succeed in entering, he said.