Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

MOGADISHU, Somalia — Somali security forces have ended a night-long siege at a Mogadishu hotel by five extremist attackers who stormed the building after a suicide car bomber detonated an explosives-laden vehicle at the entrance gate on Saturday afternoon. The attack killed 23 people.

Troops regained control of the Nasa-Hablod hotel on Sunday morning, having killed three attackers and captured two alive, said Capt. Mohamed Hussein. Al-Shabab, Africa’s deadliest Islamic extremist group, quickly claimed responsibility for the attack.

The assault started Saturday afternoon when a suicide truck bomb exploded outside the popular hotel in the capital. The blast twisted vehicles and caused massive damage to nearby buildings which were left with only their walls standing.

The attackers invaded the hotel and gunfire continued as security forces fought them inside the building. Two more blasts were heard, one when an attacker detonated a suicide vest.

Somalis carry away a man injured after a car bomb was detonated in Mogadishu, Somalia Son Oct 28, 2017. Farah Abdi Warsameh / AP

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

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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.

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 bombing at its gate.

"I think they were al-Shabab 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.

The scene of a car bomb attack in Mogadishu, Somalia on Oct. 28, 2017. At least ten people were killed in two suicide car bomb attacks for which extremist group al-Shabab has claimed responsibility. According to reports, gunfire was heard inside a hotel near the presidential palace. Said Yusuf Warsame / EPA

Saturday’s bomber had pretended his truck had broken down outside the gate, said police Col. Mohamed Abdullahi. The bomber stopped outside the heavily fortified hotel and pretended to repair the truck before detonating it, he said.

Al-Shabab often targets high-profile areas of Mogadishu. Although it quickly claimed responsibility for Saturday’s attack, it has not commented on the massive attack two weeks ago; experts have said the death toll in the earlier bombing was so high that the group hesitated to alienate Somali citizens.

Somalia President Mohamed Abdullahi Mohamed said the new attack was meant to instill fear in Somalis who united after the Oct. 14 bombing, marching in the thousands through Mogadishu in defiance of al-Shabab.

Since the blast two weeks ago, the president has visited regional countries 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.

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

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. U.S. military officials and others in recent months have expressed concern that Somali forces are not yet ready.

The two attacks this month have shaken public confidence in the ability of Somali army to take over from the African Union forces. Many in the capital accuse the government of not doing enough to protect them.

“We are drying in hundreds now,” said Ahmednur Hashi, a Mogadishu resident. “Who is going to protect us?”