Mogadishu_Somalia
A Somali man browses the internet on his mobile phone at a beach along the Indian Ocean coastline in Somalia's capital Mogadishu on Jan. 10, 2014. Reuters/Feisal Omar

(Reuters) - Islamist militants hurled grenades at the gate of a hotel in central Somalia on Thursday then opened fire as they burst into the building used by Somali soldiers and Djiboutian African Union peacekeepers, residents said.

Al Qaeda-linked group al Shabaab said it killed several guards and soldiers in the attack in town of Bulobarde, the movement's second assault on the hotel since March. The deaths could not be confirmed independently.

Shopkeeper Farah Nur told Reuters al Shabaab fighters started shooting once they burst inside. Other residents said they heard explosions and gunfire.

"We don't know of any casualties. The place is now surrounded by many AMISOM (the African Union peacekeeping force in Somalia) and Somali forces," Nur said.

The militants, who seek to impose their own harsh version of Islamic law, control large areas of countryside and smaller towns. They have launched attacks at home and in the region, including a raid on a Kenyan shopping mall in September that killed at least 67 people

"Our well-armed Mujahideen ... entered Hotel Amalow in Bulobarde again. They are carrying out the operations, shootings," Sheikh Abdiasis Abu Musab, al Shabaab's spokesman for military operation told Reuters.

"We killed several guards at the gate and then killed six Djibouti soldiers including two senior officials inside the hotel - the operation was successful and now it is over," he added.

Residents said two of the attackers had been shot dead.

"We were allowed to see two dead militants who were laid outside the hotel but we could not see the casualty of AMISOM and Somali forces. No civilian can enter the hotel," local elder Sabdow Ali told Reuters by phone.

Somalia's government is struggling to impose any sense of order more than two decades after the fall of dictator Mohamed Siad Barre tipped the country into chaos.

In May, al Shabaab fighters attacked the parliament in Mogadishu, killing at least 10 security officers.