Mogadishu: At least 12 people were killed in the Somali capital on Sunday after Shebab gunmen used a vehicle packed with explosives to blast their way inside a hotel, police said.
The Al-Qaeda-linked Shebab claimed responsibility for the dawn attack at the Sahafi hotel, which is popular with members of parliament, government employees and businessmen.
After the car bomb ripped a hole in the hotel's fortified walls, gunmen stormed the building firing semi-automatic rifles and throwing grenades, witnesses said.
"This is the action of an increasingly desperate, internally-divided group of extremists," Somali President Hassan Sheikh Mohamud said in a statement, after security forces overpowered the attackers in a gunbattle.
"Our security forces have full control of the situation," he added.
Somalia's National and Intelligence Agency declared the attack over several hours after the shooting began, although special forces appeared to be carrying out mopping-up operations for some time afterwards.
The African Union mission in Somalia (AMISOM), a 22,000-strong force fighting the Shebab, said it had helped government troops repel the attack and secure the hotel.
"Attackers exploded a car bomb to gain entry before going inside... we have reports of 12 dead," policeman Abdulrahid Dahir said.
Among the fatalities was a Somali freelance journalist, the Somali Association of Journalists said, adding that a photographer with the Reuters news agency had been slightly hurt.
The pair were hit when they arrived at the hotel to report on the first explosion. It was then that the second car bomb detonated.
A former senior army commander was also among the dead.
The UN envoy to Somalia, Nick Kay, condemned the "bloody attack" which he said underlined the need to help support Somalia's security forces in stopping such assaults.
Witnesses said they had seen several bodies of people killed in the initial blast, when a minibus packed with explosives was reportedly used to ram the gates of the hotel compound. A second heavy explosion followed shortly afterwards.
The fighters then poured inside, with witnesses reporting intense gunfire and several loud blasts.
"There was a huge explosion and people around the entrance were killed," said Mohamed Ismael, a witness, who was nearby when the attack began.
Shebab insurgents, who are fighting to overthrow the internationally backed government in Mogadishu, have carried out a string of attacks on hotels in the capital.
The Islamists have frequently used car bombs driven by suicide bombers to break into a complex or a building, with more attackers then following on foot.
Like other international hotels in Mogadishu, the Sahafi is heavily fortified.
It was the site of the kidnapping of two French security agents in 2009, one of whom later escaped while the other was killed by the Shebab during a failed rescue attempt in 2013.
Shebab spokesman Abdulaziz Abu Musab claimed the gunmen had overrun the hotel, which is situated near the major K4 roundabout.
"The mujahedeen fighters took control of the Sahafi hotel, where apostates and invading Christians were staying," he said in a statement.
The Shebab are on a mission to disprove claims they are close to defeat since being routed from Mogadishu in mid-2011 and losing several alleged commanders in US drone strikes.
Beside staging frequent attacks within Somalia the militants, who still hold large swathes of the countryside, have also carried out a string of strikes in neighbouring countries.
This week, President Mohamud called on Shebab fighters to surrender amid reports some factions may have shifted allegiance from Al-Qaeda to the Islamic State group.
Mohamud said the reported divisions were "symptomatic of a group that has lost its way", and warned that Somalis "do not need a new brand of horror and repression".
In a statement, AMISOM said it strongly condemned Sunday's "heinous terrorist attack."
"AMISOM reiterates the need for continued cooperation and support to the government of Somalia and its troops, to stop these acts of terror perpetuated on the Somali people by al Shabaab," it said.
"The African Union stands firm in its resolve to work towards restoration of lasting peace in Somalia."