Islamist militants blasted their way into a popular hotel in the Somali capital Mogadishu on Friday, killing at least seven people and trapping government officials inside, police and witnesses said.
Police said forces from the elite U.S.-trained special forces troops known as "Gaashaan" (Shield) then stormed the hotel compound and took back control of most of the building.
"Most parts of the hotel are in the hands of the government forces now but there is...sporadic gunfire and grenades hurled from the windows of the second floor of the hotel," Major Ismail Olow, a police officer, told Reuters.
Police said the troops had killed most of the attackers.
"It is believed the attackers were nine in number. Six of them have been killed. Three are believed to be still hiding," Olow said.
He said they had rescued most of the government officials, including the Somali ambassador to Switzerland, who was at the hotel.
Al Qaeda-linked group al Shabaab, which has also launched gun and bomb attacks in neighboring Kenya and other countries, said its followers were responsible.
Al Shabaab was pushed out of the capital by African peacekeeping forces in 2011, but has kept up guerrilla-style attacks, looking to overthrow the government and impose its strict version of Sharia, or Islamic law, on the country.
An offensive launched last year by African Union forces along with the Somali army has driven the group out of its strongholds in central and southern Somalia, while a series of U.S. drone strikes have killed some of its top leaders.
The remains of two destroyed cars could be seen at the gates of the hotel which was surrounded by police.