A group of attackers detonated a car bomb and then stormed a hotel in the heart of Somalia's capital, Mogadishu, taking hostages. Security forces say they have now taken control of the scene.

There are conflicting reports about the incident's death toll — The Associated Press reports that 14 people were killed in the attack, while the Somali government says in a tweet that 12 people were killed and 20 injured. Reuters reports that at least 15 people were killed and an unspecified number were injured, including hotel guards, civilians and militants.

The bomb went off outside the gate of Hotel Naso Hablod, starting an hours-long standoff between police and gunmen, according to media reports.

It's unclear how many hotel guests were taken hostage or how many gunman participated in the attack.

"We have finally ended the siege. The last remaining militants were killed on the top floor," police Capt. Mohamed Hussein told The Associated Press.

The al-Shabab militant organization claimed responsibility for the deadly attack, Reuters reported. The group is affiliated with al-Qaida and has carried out numerous attacks in Somalia.

"We attacked the hotel which was frequented by the apostate government members," al-Shabab spokesman Sheikh Abdiasis Abu Musab told Reuters.

Photos published by wire services show injured people covered in blood fleeing from the scene or being carried by other civilians, as security forces are seen taking aim at the hotel. A heavy exchange of gunfire is heard in a video purportedly from the scene, posted on Twitter by Somali activist Osman Yusuf.

Witness Ali Mohamud tells the AP that the attackers were firing randomly at hotel guests. "They were shooting at everyone they could see. I escaped through the back door," he says.

Al-Shabab was pushed out of the capital four years ago by African Union forces but continues to mount attacks there, as we have reported. The group also claimed responsibility for another assault on a Mogadishu hotel just three weeks ago that killed at least 15 people.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.