At least 13 people were killed and dozens wounded in a dawn attack Sunday at a hotel in the Somalian capital of Mogadishu, a police official said.
Al-Shabab, a group fighting against Somalia's weak U.N.- backed government, claimed responsibility for the attack in a statement that was delivered by their spokesman, Sheikh Abdiaziz Abu-Musab, on the group's radio station, Andulus.
By midday, Somali security forces had ended the siege at the Sahafi Hotel, said police commander Ali Ahmed.
"It's over now, we have killed all the attackers," he said. "They came under cover of darkness and attacked the hotel while some of the guards were sleeping."
Somali troops and African Union forces were deployed to the scene and took control of the situation, the spokesperson for the African Union Mission in Somalia, Lieutenant Colonel Paul Njuguna, told Al Jazeera.
The attack started at daybreak when a suicide bomber detonated a vehicle laden with explosives at the gate of the hotel, and then four men armed with AK-47 rifles, grenades and suicide vests invaded the hotel. As some went into rooms to kill residents, others went to the rooftop to fight government soldiers responding to the attack, said Capt. Mohamed Hussein, a senior Somali police officer.
A second explosion came from a car bomb outside the hotel, said witnesses.
Those killed include a parliamentarian, Mohamed Abdi Abtidoon. A freelance photographer, Mustaf Abdi, who on several occasions contributed to Al Jazeera reports, was also killed.
Medical sources confirmed that a top Somali military commander, General Gacma Duule, and Somalia's ambassador to Ethiopia, Abdisalam Haji Adam, were injured.
"Had it not been the courage of some of the hotel residents who fought back the terrorists, the death toll could have been a lot higher than its now," Hussein said.
"They came in firing bullets randomly and chanting God is great — they shot anyone they could see," said a surviving hotel resident, Ahmed Abdulle. "The guards tried to fight them off but it was too late, they were already inside," Abdulle said by phone from Mogadishu. "I hid myself under my bed until security forces broke into my room and got me out a back door. It was a terrible experience."
Somali troops and African Union forces went to the scene and fought the attackers to take control of the hotel, according to a Twitter post by the African Union Mission in Somalia, which has deployed troops to bolster Somalia's government against Al-Shabab’s insurgency.
One photographer taking pictures at the scene was injured.
"I was at the scene of the explosion busy taking photos when a vehicle full of explosives exploded beside me. I fell on the ground and saw part of my body bleeding, I was with another journalist who was killed in the attack," said Feisal Omar, who has since been discharged from the Mogadishu hospital.
The Sahafi Hotel, which is often frequented by Somali government officials and business executives, has been targeted before. Two French security advisers were abducted from the hotel in 2009.
Al-Shabab, despite being forced out of Mogadishu and many other cities and towns across Somalia, continues to launch lethal attacks in the capital and elsewhere. It is fighting to oust the Mogadishu government and install a strict version of Shariah law.
Al-Shabab has also attacked neighboring countries that have sent troops to support the Mogadishu government. The rebels killed 148 people in an attack on a college in Garissa, Kenya in April.
Sunday's attack was condemned by Somali President Hassan Sheikh Mohamud.
"This is the action of an increasingly desperate, internally-divided group of extremists ... (who) seek to grab the headlines through killing innocent Muslims."
Mohamud urged Somalians "to prevent extremists from distorting the faith of our fathers, and leading people astray in their quest for brutality and destruction. We must do this by confronting their warped ideology and liberating Somalia from them entirely."
Al Jazeera with wire services