At least 23 people have been killed in a double car bombing in the Somali capital, Mogadishu, which is still reeling from an attack that left hundreds dead earlier this month.

A suicide car bomber first drove into a hotel where President Mohamed Abdullahi Farmajo was due to host a meeting on Saturday, followed by a car bombing near a former parliament building.

Al-Shabab claimed responsibility for the attacks, Al Jazeera's Mohammed Adow, reporting from Nairobi in neighbouring Kenya, said.

He said at least three heavily armed al-Shabab fighters gained entry into the Nasa-Hablod Hotel on the heels of the car bombing there, but they were later killed by Somali security forces.

"We can confirm that the president was not at the hotel at the time of the attack," he said.

Farmajo was scheduled to meet the presidents of Somalia's five federal republics at the hotel later in the evening, he said.

"Rescue workers are saying the death toll could be much higher. They have recovered many bodies from the hotel," our correspondent said, quoting witnesses who reported seeing al-Shabab fighters throw grenades inside the hotel.

Several buildings near the hotel also collapsed, trapping an unknown number of people beneath the rubble.

Mohamed Ahmed, a tuk-tuk driver who was driving by the Nasa-Hablod Hotel at the time of the attack, said he "saw a car exploding at the gate of the hotel. I don't know where two of my customers have gone.

"I don't know if they are dead or alive. But I saw four dead bodies".

Security fragility

Al Jazeera's Adow said al-Shabab "seems to have taken advantage of the fragility of the national security apparatus. No one expected them to carry this out just two weeks to the day they launched Somalia's deadliest attack, in which more than 358 people were killed".

{articleGUID}

According to an Al Jazeera tally, since the start of this year more than 20 explosions have targeted Mogadishu, killing at least 500 people and injuring more than 630.

A roadside explosion hit a minibus carrying passengers, 36km south of Mogadishu, on October 22, killing at least 11 people.

The devastating attack on October 14 left at least 358 people dead and more than 400 injured.

The Somali government blamed al-Shabab for the assault, but no group has claimed responsibility so far.