Over 20 people were killed after Islamist militants attacked a popular beachfront restaurant in the Somali capital Mogadishu Thursday. Somalia’s security forces ended the deadly siege, which lasted for eight hours, a police official said Friday, according to the Associated Press (AP).

Al-Shabab group reportedly claimed responsibility for Thursday’s attack that began after two car bombs exploded about an hour apart. Between the explosions, gunmen stormed the restaurant opening fire and taking several people hostages. More than 35 people were reportedly rescued during the operation while local authorities said they have arrested the suspected leader of the attack, BBC reported.

Witnesses said the gunmen shouted "Allahu akbar," the Arabic phrase for "God is great," and entered the restaurant, AP reported.

"They randomly fired at people sitting near the beach before entering the restaurant," witness Ahmed Nur, who was at the beach at the time of the attack, told AP.

Al-Shabab, which has direct ties to al Qaeda, wants to topple the Western-backed government and impose Islamic law, or Shariah, in the country. The militant group was ousted from Mogadishu in August 2011, but still has a presence in large areas of southern Somalia.