A victim is carried away from the scene of a terror attack at the Ambassador Hotel, after a car bomb exploded on June 1, 2016 at a top Mogadishu hotel that houses several MPs, killing several people, and followed by a gun battle. Somalia's Al-Qaeda-linked al-Shabaab group was chased out of the capital Mogadishu in 2011 but remains a dangerous threat in both Somalia and neighbouring Kenya, where it carries out frequent attacks. / AFP PHOTO / MOHAMED ABDIWAHAB

Somali security forces Thursday ended an overnight siege by extremist gunmen at a hotel in the capital which killed least 15 people, including two members of parliament, officials said.

The assault started when a vehicle laden with explosives detonated outside the Ambassador Hotel 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.

Al-Shabab 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 Thursday.

Nine bodies were removed from the hotel after troops killed the last remaining assailants, Capt. Mohamed Hussein, a senior Somali police officer told The Associated Press.

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 this 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.