Somali security forces have ended an overnight siege by extremist gunmen at a hotel in Mogadishu which killed at least 15 people, including two members of parliament.
The assault started when a vehicle laden with explosives detonated outside the Ambassador Hotel on Wednesday evening and then three militants stormed inside the building, said the African Union Mission in Somalia.
The African Union multinational force is bolstering Somalia's weak government against an insurgency by the Islamic extremist group al-Shabab, which claimed responsibility for the attack.
One militant was killed at the entrance of the hotel while two others entered the building and shot at residents, the AU force said in a statement. All the attackers were killed in the siege that ended early on Thursday.
Nine bodies were removed from the hotel after troops killed the last remaining assailants, Captain Mohamed Hussein, a senior Somali police officer said.
Six out of 40 people injured in the attack died from their wounds, Ahmed Mohamed, a nurse at Madina hospital in Mogadishu said.
Chairman of the African Union Commission for Somalia, Francisco Madeira, condemned the attack, saying it targeted government ministers, politicians and innocent citizens
The attack came on the eve of the Muslim holy month of Ramadan, during which extremists often step up attacks in the volatile East African country.
The hotel assault highlights challenges facing the Somali government and African Union forces that are struggling to secure the seaside capital, which has seen a series of attacks by al-Shabab.
An attack on another Mogadishu hotel and public garden in February killed at least nine civilians. A car bomb exploded outside a restaurant in the capital in April, killing at least five.
The insurgents have been ousted from most of Somalia's cities but continue to carry out bombings and suicide attacks.