Somali forces claim to have defeated the militants who stormed a hotel in the capital after a bloody siege.
At least 12 people were killed in the deadly 30-hour ordeal, although local media reports the death toll could be even higher.
The assailants used explosives to gain entry to Mogadishu’s Hayat Hotel on Friday before violently taking control and holding guests hostage overnight.
Islamist extremist group al-Shabab has taken responsibility for the attack.
“The security forces have ended the siege now and the gunmen are dead, we’ve had no incoming gunfire from the building in the past hour,” an unnamed official told AFP news agency.
The hotel has been largely destroyed following intense bombardment by security forces throughout Friday night and Saturday, with videos showing explosions and smoke billowing from the building’s rooftop.
The BBC has not been able to confirm independently whether the attack has ended.
A police officer told Reuters that two car bombs had been used to gain access to the hotel on Friday evening – targeting its front barrier and gate.
After the initial attack, a website affiliated to al-Shabab said a group of militants were “carrying out random shootings” after having “forcibly entered” the hotel – described as a popular location for employees of the federal government to meet.
“So far, we have confirmed 12 people, mostly civilians, died,” Mohammed, an intelligence officer who gave only one name, told Reuters news agency on Saturday.
Security forces struggled to gain access to the floor for hours because the gunmen, who were holding an unknown number of people hostage, had reportedly bombed out the stairs needed for access as well.
The director of Mogadishu’s main trauma hospital told AFP news agency that the facility was treating at least 40 people wounded in the hotel attack and a separate mortar strike on another area of the capital.
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 have also attacked targets along the Somalia-Ethiopia border, which has raised concerns about a possible new strategy by al-Shabab.
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.