Somalia's security forces on Sunday took four hours to regain control of the Elite Hotel in the Lido beach area of Mogadishu after five assailants stormed it in the evening, said Information Ministry spokesman, Ismael Mukhtaar Omar.
"Ten people were dead and five militants were also killed, plus one Somalia special police officer," Omar told AFP news agency.
It was not clear how Somali security forces managed to end the siege on the hotel and kill the assailants, who at one point were said to have taken hostages.
The attack started in the afternoon with a powerful car bomb blast which blew off the security gates to the hotel. Then gunmen ran inside and took hostages, mostly young men and women who were dining there, said ministry spokesman Omar.
Ambulance sirens could be heard in the area which had a power outage when the attack started.
The incident shattered a period of calm that had lasted for a few months. Earlier this year Somalia had a spate of bomb attacks.
Hotel frequented by VIPs
The hotel, owned by Somali lawmaker and prominent businessmen Abdullahi Mohamed Nur, is often frequented by politicians, journalists, civil society activists.
Somalia's homegrown Islamic extremist rebels, al-Shabab, who are allied to al-Qaida, have claimed responsibility for the attack via its radio arm, Andalus.
"The terrorists want to create despair in our society… such evil acts will not deter us from moving our country forward," said Somalia's President Mohamed Abdullahi Farmajo, while condemning the attack.
Somalia has been embroiled in deadly violence since 1991, when clan warlords overthrew leader Siad Barre and then turned on each other.
Since 2008, Al Shabaab has been fighting to overthrow the internationally recognized central government and establish its rule based on its own interpretation of Islamic Sharia law.
Last week, four Shabaab fighters held in Mogadishu's central prison were killed in an intense shootout with security forces after they somehow managed to get their hands on weapons within the facility.
Editor's Note: This is an updated version of a previous article
mm/sri (AFP, AP, dpa, Reuters)