The terrorist siege of a Mogadishu hotel has ended, police in Somalia said Saturday, but not before at least 15 people were killed.

"I can assure you that the hotel siege is over and that the attackers were killed by our security forces," said Somali Security Minister Abdirizak Omar Mohamed. He said a clearing operation was underway and that details of the damage done by the siege would be released soon.

The militant group al-Shabab claimed responsibility for the attack, saying the hotel has been frequented by what it called "apostate government members."

Police said the terrorists set off a car bomb outside the Hotel Naso-Hablod on Saturday afternoon before gunmen burst into the building, firing their weapons at random and seizing hostages.

Police stormed the hotel and engaged the gunmen in a firefight, cornering them on the top floor.

Witnesses said dead bodies were on the ground outside the hotel entrance, and others could be seen trapped inside a burning car.

A State Department official said the U.S. "strongly condemns the attack and expresses our deep condolences to their victims, their families and the Somali people. We remain committed to Somalia's security and stability and are proud to stand side by side with Somalia in the fight against terrorism."

A view of Hotel Naso-Hablod, destroyed after a bomb attack in Mogadishu, Somalia, June 25, 2016. A Somali police officer says a suicide car bomber detonated an explosives-laden vehicle at the gate of a hotel in Mogadishu followed by gunmen who were fighti

The attack, the latest in a series against hotels and restaurants, came just three weeks after gunmen from the al-Qaida-linked al-Shabab group stormed the Ambassador Hotel in Mogadishu. The militants besieged the hotel for more than 12 hours.

Somali officials said 24 people were killed in that attack, including the three gunmen, and 57 people were rescued after being held overnight by the gunmen.

Saturday's attack came while Muslims are observing Ramadan. In previous years, militants have increased attacks during the holy month, just before dawn or just after dusk, when people are gathering to break their daily fast.

Al-Shabab has killed thousands since it began its campaign of terrorism 10 years ago in an effort to turn Somalia into a conservative Islamic state.

Somali and African Union forces have pushed the militants out of large cities and into rural areas, but, as Saturday's attack proves, al-Shabab is still a lethal force.

Earlier this month, Matt Bryden, a leading regional analyst and director of the Nairobi, Kenya-based Sahan Research organization, said al-Shabab has employed "the same tactics, techniques and procedures" in its attacks year after year.

"I think that is where we see much more needs to be done in developing the capacity and the professionalism of the Somali security forces," Bryden told VOA.