The militant group al-Shabaab said it had taken control of a hotel near the center of the Somali capital Mogadishu.
Police said the attackers detonated two explosives outside the hotel before entering and opening fire.
In a statement, the Islamist group claimed control of the complex and said they were “shooting on everyone”.
Hayat is said to be a popular meeting point for federal government employees.
Nine people were injured and carried away from the hotel, Abdikadir Abdirahman, head of Mogadishu’s Amin ambulance service, told Reuters.
Unverified images circulating on social media appeared to show smoke billowing from the hotel, while shouting and loud noises could be heard.
“Two car bombs hit the Hayat hotel,” a police officer told Reuters in a statement. “One hit a barrier near the hotel, then another hit the hotel door. We believe the fighters were inside the hotel.”
Al-Shabaab, an affiliate of al-Qaeda, has been in long-standing conflict with the federal government.
The group controls much of southern and central Somalia but has been able to expand its influence into areas controlled by the Mogadishu-based government.
In recent weeks, fighters affiliated with the group have also attacked targets along the Somali-Ethiopia border, raising concerns about a possible new al-Shabaab strategy.
The attack on Friday marks the first in the capital by the group since Somalia’s new president, Hassan Sheikh Mohamud, was elected in May.