In the terrible 30-hour ordeal, at least 40 individuals died, though local media says that number may be considerably higher.
The attackers broke into the Hayat Hotel in Mogadishu on Friday using explosives, then brutally seized power and held overnight guests hostage.
Al-Shabab has claimed responsibility for the assault.
There hasn’t been any incoming gunfire from the building in the last hour, an unnamed official told the AFP news agency. “The security forces have already terminated the siege and the shooters are dead.”
After being heavily shelled by security forces on Friday night and Saturday, the hotel has essentially been destroyed. Videos show explosions and smoke billowing from the building’s rooftop.
Two vehicle bombs, which were aimed at the hotel’s front gate and barrier, were used to enter the building on Friday evening, a police official told Reuters.
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 40 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.