Security forces in Mogadishu have ended a night-long siege at a hotel by five extremist attackers that left 23 people dead and more than 30 injured.

The group stormed the building after a suicide car bomber detonated an explosives-laden vehicle at the entrance gate on Saturday afternoon.

Capt. Mohamed Hussein said that troops regained control of the hotel on Sunday morning, having killed three attackers and captured two alive.

Police said security forces had rescued 30 people, including a government minister, from Mogadishu’s Nasa-Hablod hotel

Among the dead were a mother and three children, including a baby, all shot in the head, Hussein said. Other victims included a senior Somali police colonel, a former lawmaker and a former government minister. Footage from the scene showed twisted vehicles and nearby buildings with only walls left standing.

Saturday’s blasts came two weeks after more than 350 people were killed in a massive truck bombing on a busy Mogadishu street in the country’s worst-ever attack.

Al-Shabaab, Africa’s deadliest Islamic extremist group, quickly claimed responsibility for Saturday’s attack and said its fighters were inside the hotel. As night fell, sporadic gunfire could be heard as soldiers responded. A senior Somali police colonel and a former lawmaker were among the dead, Hussein said.

Mohamed Dek Haji said he survived the bombing as he walked beside a parked car that was largely destroyed by the explosion. He said he saw at least three armed men in military uniforms running toward the hotel after the suicide bombing at its gate.

“I think they were al-Shabaab fighters who were trying to storm the hotel,” he said, lying on a hospital bed. He suffered small injuries on his shoulder and skull from flying glass.

Witnesses in some previous attacks have said al-Shabab fighters disguised themselves by wearing military uniforms.

Al-Shabaab often targets high-profile areas of Mogadishu. It has not commented on the massive attack two weeks ago; experts have said the death toll was so high that the group hesitated to further anger Somali citizens as its pursues its insurgency.

Since the blast two weeks ago, president Mohamed Abdullahi Mohamed has visited other countries in the region to seek more support for the fight against the extremist group, vowing a “state of war”. He also faces the challenge of pulling together regional powers inside his long-fractured country, where the federal government is only now trying to assert itself beyond Mogadishu and other major cities.

A 22,000-strong multinational African Union force in Somalia is expected to withdraw its forces and hand over the country’s security to the Somali military by the end of 2020. In recent months US military officials and others have expressed concern that Somali forces are not yet ready.

The US military also has stepped up efforts against al-Shabaab this year in Somalia, carrying out nearly 20 drone strikes as the global war on extremism moves deeper into the African continent.