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 three militants stormed inside the building, said the African Union Mission in Somalia. The AU multinational force is bolstering Somalia's weak government against an insurgency by the Islamic extremist group Al Shabaab.

Al Shabaab claimed responsibility for the attack, which sheared off the front of the luxury hotel and left blood spattered on bullet-marked walls. The twisted remains of dozens of vehicles ringed the site.

One militant was killed at the entrance to the hotel while two others entered and shot at residents, the AU force said in a statement. All the attackers were killed in the siege.

Nine bodies were removed from the hotel after troops killed the 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. Victims screamed in pain in overwhelmed hospitals, and there were fears the death toll could rise.

Somali President Hassan Sheikh Mohamud condemned the attack, saying extremists launched it after suffering major blows from the country's security forces in rebel-held towns in recent months.

The hotel 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 assault highlights challenges facing the Somali government and AU forces that are struggling to secure the seaside capital. An attack on another Mogadishu hotel and public garden in February killed at least nine civilians. A car bomb outside a restaurant in the capital in April killed at least five.

The insurgents have been ousted from most of Somalia's cities but continue to carry out bombings and suicide attacks.

The Pentagon on Wednesday announced that a U.S. drone strike on Friday had targeted a senior military commander of Al Shabaab in Somalia, Abdullahi Haji Da'ud. U.S. officials said they couldn't confirm yet if he was killed.