MOGADISHU, Somalia — Islamist militants stormed a popular hotel in the heart of Mogadishu, Somalia’s capital, on Sunday, blowing up the front gate with a car bomb, shooting guests and hotel workers, and then battling with security forces from the hotel’s rooftop for several hours.

Somali government officials said at least 14 people at the Sahafi Hotel were killed in the attack, which was immediately — and gleefully — claimed by the Shabab militant group.

If there is one hotel everyone knows in Mogadishu, it is the Sahafi. Warlords and militants alike used to hang out and plot schemes in the lounge and courtyard while sipping grapefruit juice and pulling apart camel meat steaks.

Sahafi means journalist in Arabic, and for years the hotel has served as the gateway to one of the world’s most dangerous countries for foreign journalists, aid workers and the rare brave businessman. Even in the hardest times, the staff managed to provide clean rooms and good food. Lobster was one of the house specialties, served alongside mountains of French fries. Recently, the hotel was a popular rendezvous spot for officials from Somalia’s fledgling government.