Nine people were killed when Al Shabab extremists attacked a hotel in Mogadishu on Sunday.
The extremist group, linked to Al Qaeda, started its attack with a car bomb at the entrance of the Afrik Hotel in the centre of the Somalian capital.
Gunmen then stormed the hotel and exchanged fire with security personnel.
"There was another blast after the first big one," said witness Osman Saadaq.
Al Shabab claimed responsibility for the attack.
"The mujahideen stormed in an ongoing operation inside Afrik Hotel where members of the apostate team are stationed," the extremists said.
The hotel is often used by Somali officials, members of the security forces and community leaders.
Police spokesman Sadik Dudishe said that officers "immediately entered the building" at the start of the attack, rescuing most of those inside.
Agence France-Presse reported that Somali soldiers quickly surrounded the hotel.
Witnesses said they could still hear sporadic gunfire and explosions for some time after the attack began.
Al Shabab has been waging a violent insurgency across the country and seeks to unseat the internationally backed government in Mogadishu.
The group was driven out of the city by government forces backed by 20,000 African Union peacekeepers in 2011.
But the group still controls territory outside the cities, from where they launch attacks against government targets, as well as occasionally crossing the border to carry out raids in Kenya.
Al Shabab has intensified its attacks in Kenya in recent years, including several major assaults as far as the capital, Nairobi, which killed nearly 300 people.
Somalia was scheduled to hold indirect parliamentary and presidential elections before February 8, but the process was derailed by political disagreements between the central government in Mogadishu and states.