DEVELOPING: A team of gunmen took hotel guests hostage after storming the building in a Somalia’s capital city, Mogadishu on Saturday, police have revealed.

A suicide bomber detonated an explosives-laden vehicle at the gate of the Nasa-Hablod hotel near the capital’s busy KM-4 junction, followed by a second explosion heard inside the hotel as gunmen fought their way in, police said. At least four bodies were seen outside the hotel, one officer said.

The number of hostages was unclear. The attackers hurled grenades and fired machine guns to resist security forces trying to reach them on the second floor, police captain Mohamed Hussein said.

Security forces killed at least two of the attackers who have deployed snipers on the hotel rooftop, Hussein added.

The al-Shabab group said its fighters were still engaged with security forces. The Somalia-based terror network has been waging a deadly insurgency across large parts of the country and often employs suicide car bomb attacks to penetrate heavily fortified targets in Mogadishu and elsewhere.

The attackers “took positions behind blast walls and sandbags; fighting is still ongoing,” he said, as gunfire could be heard in the background.

A witness to the attack, Ali Mohamud, said the attackers randomly shot at guests at the hotel.

“They were shooting at everyone they could see. I escaped through the back door,” he said.

Yusuf Ali, an ambulance driver, told The Associated Press that he evacuated 11 people injured in the attack to hospitals.

“Most of them were wounded in crossfire,” he said

In early June, an overnight siege by extremist gunmen at another hotel in the capital killed least 15 people, including two members of parliament. Al-Shabab claimed responsibility for that attack.

The latest attack comes during the Muslim holy month of Ramadan, during which extremists often step up attacks in this volatile East African country.

The assaults in the seaside capital have highlighted the challenges facing the Somali government and African Union forces that are struggling to secure the country. An attack on another Mogadishu hotel and public garden in February killed at least nine civilians. A car bomb outside a restaurant in the capital in April killed at least five.

The al-Shabab insurgents have been ousted from most of Somalia’s cities but continue to carry out bombings and suicide attacks.

The African Union force faces shrinking resources after the European Union recently cut its funding to the AU mission in Somalia by 20 percent. Citing that cut, Uganda’s military chief said Friday his country plans to withdraw its more than 6,000 troops from the AU force in Somalia by December 2017. The Ugandans are the largest troop contingent.

The Associated Press contributed to this report.