An attack on a beach-side restaurant in the Somali capital, Mogadishu, has left at least 20 people dead. Security forces moved in to end a siege on the site, police reported.

At least six civilians died in the attack, according to the official Twitter account of the National Intelligence and Security Agency (NISA) of Somalia, with the number of injured yet to be confirmed. More than 35 people were rescued, among them children aged four to six.

#liidobeachattack, Civilians death 6 to 10, injuries yet to be confirme, more than 35 civilian were rescued. — NISA (@HSNQ_NISA) 22 января 2016

#liidobeachattack Children aged 4 - 6 were among those rescued from the Hotel, — NISA (@HSNQ_NISA) 22 января 2016

The total number of attackers was reported to be eight - six of whom were shot at the scene, one killed himself, and one was detained, according to the latest reports.

BREAKING: #AlShabaab claims responsibility for the ongoing attack in Beach veiw hotel in #Mogadishu - Radio Andalus reports. #Somalia — Live From Mogadishu (@Daudoo) January 21, 2016

Local security forces took control of the building early in the morning, said Capt. Mohamed Hussein, speaking from the scene.

Senior police officer Major Abdiqadir Ali, said: “A car bomb exploded at the entrance of the Beach View Cafe at Lido beach,” Reuters reported on Thursday.

The blast was reportedly followed by a gunfight between security forces and the attackers, during which another car exploded.

"They randomly fired at people sitting near the beach before entering the restaurant," said witness Ahmed Nur.

Twitter users also reported a “hostage situation” at the Beach View Cafe.

A Somali police official told AP that the Lido Seafood restaurant was attacked. A suicide car bomber rammed the gates and gunmen fought their way into the building.

According to the NISA, the leader of the attackers was captured alive by troops.

Explosions & gunfire continue in Lido. Security forces rescued dozens of people, trying 2 end the operation & free the hostages. #Somalia — Abdirashid Muse (@Gobanimodoon) 21 января 2016

Islamist group Al-Shabaab claimed responsibility for the attack on the beach view hotel, Radio Andalus reported.

The group has previously used the tactic of targeting hotels and restaurants popular among government officials.