It took Somali forces more than 30 hours to contain the fighters who had stormed Mogadishu's Hayat Hotel on Friday evening in an assault leaving at least 21 dead and scores wounded.
A deadly attack in which at least 21 people were killed and many others wounded when gunmen stormed a hotel in the capital was ended by Somali security forces on Sunday.
It took Somali forces more than 30 hours to contain the fighters who had stormed Mogadishu's Hayat Hotel on Friday evening in an assault that started with loud explosions.
The siege ended around midnight, police commissioner Abdi Hassan Hijar told reporters.
"During the attack, the security forces rescued many civilians trapped in the hotel, including women and children," he said.
Police are yet to give a detailed explanation of how the attack unfolded. It remains unclear how many gunmen entered the hotel, while local media reported that the onslaught was preceded by at least two explosions at the entrance to the hotel.
Several dozen people were being treated for injuries at the local hospitals, some in critical condition, health authorities stated.
Ismail Abdi, the hotel's manager, told AP that security forces were still working to clear the area.
No more gunfire could be heard after 9 am local time (8 am CET). Onlookers gathered outside the gates of the badly damaged hotel on Sunday morning, surveying the scene.
The Islamic extremist group al-Shabab, which has ties with al-Qaida, claimed responsibility for the attack, the latest of its frequent attempts to strike places visited by government officials.
The attack on the hotel is the first major terror incident in Mogadishu since Somalia's new leader, Hassan Sheikh Mohamud, took over in May.
UN Secretary-General Antonio Guterres condemned the attack, according to a spokesman's statement that said the UN supports the people of Somalia "in their fight against terrorism and their march towards peace."