Security officials say 10 people have been killed after al-Shabab militants stormed a hotel in the Somali capital, Mogadishu.
Police said attackers detonated two explosives outside the hotel before entering the building and opening fire.
They were reported to be holed up on the top floor of the Hotel Hayat, hours after the attack began.
A special police unit is said to have rescued dozens of guests and staff from the hotel.
"The security forces continued to neutralise terrorists who have been cordoned inside a room in the hotel building. Most of the people were rescued, but at least eight civilians were confirmed dead so far," said an official, Mohamed Abdikadir.
Earlier, a website affiliated to al-Shabab said a group of militants had "forcibly entered" the hotel and were "carrying out random shooting".
The Hayat is described as a popular location for employees of the federal government to meet.
Nine people were injured and carried away from the hotel, the head of Mogadishu's Aamin ambulance services, Abdikadir Abdirahman told Reuters news agency earlier.
Unverified images circulating on social media appeared to show smoke billowing from the hotel while shouting and loud bangs can be heard.
"Two car bombs targeted Hotel Hayat," a police officer told the Reuters news agency in a statement. "One hit a barrier near the hotel, and then the other hit the gate of the hotel. We believe the fighters are inside the hotel."
An affiliate of al-Qaeda, al-Shabab has engaged in a long-running conflict with the federal government.
The group controls much of southern and central Somalia but has been able to extend its influence into areas controlled by the government based in Mogadishu.
In recent weeks fighters affiliated with the group had also attacked targets along the Somalia-Ethiopia border, which raised concerns about a possible new strategy by al-Shabab.
The attack on Friday marked the first in the capital by the group since Somalia's new president Hassan Sheikh Mohamud was elected in May.
- BBC