Somali forces have ended the siege at a hotel in Somalia's capital Mogadishu, the AFP news agency said in a tweet on Saturday, citing a security commander.
"The gunmen are dead," the commander told AFP, adding that a press briefing would be held Sunday morning.
At least 12 people were killed when al Qaeda-linked militants attacked the hotel.
The attackers struck the Hayat Hotel on Friday evening with two car bombs, before entering the facility while firing their guns and seizing control.
Somalia's al Shabaab insurgents claimed responsibility.
"So far we have confirmed 12 people, mostly civilians, died," Mohammed, an intelligence officer who only gave one name, told Reuters.
The gunmen were holding an unknown number of hostages on the second floor of the building, Mohammed said, preventing authorities from using heavy weapons.
They had also bombed out the stairs to make it harder to access certain floors, he said.
As the siege entered its second day on Saturday evening, authorities had secured 95% of the building, the state broadcaster Somali National Television said. The broadcaster did not give an updated number of casualties.
Those battling the militants inside the hotel include Gaashan, a paramilitary force specializing in counter-insurgency, a former security official familiar with the force told Reuters.
The detonations sent huge plumes of smoke over the busy junction on Friday night, and the sound of gunfire still crackled across the capital on Saturday evening.
Explosions were heard on Friday night as government forces tried to wrest control of the hotel back from the militants, witnesses said.
Large sections of the hotel were destroyed by the fighting, they said.
Friday's attack was the first such major incident since President Hassan Sheikh Mohamud took office in May.
US reaction to the attack
"We express our heartfelt condolences to the families who lost loved ones, wish a full recovery to those injured, and commend Somalia's security forces."US State Department spokesman Ned Price
The United States condemned the attack and said it was steadfast in its "support of Somali and African Union-led efforts to counter-terrorism."
"We express our heartfelt condolences to the families who lost loved ones, wish a full recovery to those injured, and commend Somalia's security forces," US State Department spokesman Ned Price said in a statement.
Who is responsible for the attack?
The al Qaeda-linked al Shabaab group claimed responsibility for the attack, according to a translation by the SITE Intelligence Group, which monitors jihadist group statements.
Al Shabaab has been fighting to topple the Somali government for more than 10 years. It wants to establish its own rule based on a strict interpretation of Islamic law.
The Hayat Hotel is a popular venue with lawmakers and other government officials. There was no immediate information on whether any of them had been caught up in the siege.