MOGADISHU, Somalia -- A suicide car bomb exploded outside a popular hotel in Somalia's capital on Saturday, killing at least 23 people and wounding more than 30, and gunfire continued as security forces pursued the attackers inside the building, police said. Two more blasts were heard, one when an attacker detonated a suicide vest.

Speaking to The Associated Press by telephone from the scene, Capt. Mohamed Hussein said more than 20 people, including government officials, were thought to be trapped as security forces battled extremists holed up on the top floor of the Nasa-Hablod hotel, close to the presidential palace. Two of the five attackers were killed on the first floor, Hussein said. The others hurled grenades and cut off the building's electricity as night fell.

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.

Get Breaking News Delivered to Your Inbox

Al-Shabab, Africa's deadliest Islamic extremist group, quickly claimed responsibility for Saturday's attack and said its fighters were inside the hotel. The government has blamed the group for the Oct. 14 attack, but it has denied responsibility, BBC News reports.

Somali security officers secure the scene of a suicide car bomb explosion, at the gate of Naso Hablod Two Hotel in Hamarweyne district of Mogadishu, Somalia October 28, 2017. Feisal Omar / REUTERS

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

Security officials say Saturday's bomber had pretended his truck had broken down outside the gate. Police Col. Mohamed Abdullahi says the bomber stopped outside the heavily fortified hotel and pretended to repair the truck before finally turning it around and detonating.

Since the blast two weeks ago, President Mohamed Abdullahi Mohamed 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.

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