MOGADISHU (Reuters) - Islamist militants rammed a car bomb into the gate of a hotel in Somalia’s capital Mogadishu on Wednesday, jumped clear and stormed inside on Wednesday, killing 28 people, government and medical officials said.

Gunfire rang out as four militants burst into the Dayah Hotel, which is popular with politicians. A second explosion shook the area shortly afterwards, injuring several journalists and other people nearby.

“Well-armed mujahideen (militants) attacked the hotel and now they are fighting inside the hotel,” said an announcer on Andalus radio, which is linked to the al Shabaab jihadist group. Al Shabaab claimed responsibility for the attack.

Security forces eventually shot dead all four militants and managed to secure the building, according to Abdifatah Omar, the Mogadishu municipality spokesman. Government websites confirmed this, quoting the security minister.

“We have confirmed 28 people died and 43 others injured in the two blasts at the hotel,” Abdikadir Abdirahman, director of the Mogadishu’s ambulance services, told Reuters.

Duniye Mohamed, a doctor at Madina hospital, had earlier said some of the people taken there were very seriously wounded. Security Minister Abdirizak Umar had earlier put the death toll at 15, including four security personnel.

The secondary explosion sent a plume of flame high up over the hotel and several buildings and cars in the vicinity were destroyed.

Until 2011, al Shabaab controlled much of the Horn of Africa country including Mogadishu. Its militants often stage bomb and gun attacks in the capital in their quest to topple the Western-backed government and impose their own strict interpretation of sharia (Islamic law) on the nation.

In the past two years, African Union and Somali government forces have driven al Shabaab out of important urban strongholds but it remains active from bases in rural areas.

Slideshow ( 6 images )

Somalia swore in nearly 300 members of parliament last month and they are due to pick the president but that vote has repeatedly been postponed. It is now due to be held on Feb. 8, said a parliamentary official who did not wish to be named.