In a press conference in Mogadishu on Monday evening, Somali federal police spokesman Sadik Adan Ali Dodishe said security forces have ended the Villa Rays hotel siege in the capital.
The Al-Qaeda-linked insurgents "killed eight civilians who stayed in the hotel and the security forces succeeded in rescuing about 60 civilians, no one among the civilians was wounded," Dudishe said.
The police spokesman added that security forces killed five of the six attackers while one of them blew himself up, and during the operation, one soldier was killed and five others wounded.
Earlier, Mohamed Dahir, an official from the national security agency, told AFP that government forces had taken control of the hotel and pinned the insurgents down in a top-floor room.
The crackle of gunfire was heard coming from the besieged Villa Rose 18 hours after the Islamists stormed the hotel in central Mogadishu in a hail of bullets and explosions.
Witnesses near the scene described hearing loud explosions and gunfire on Monday morning.
"I saw several military vehicles with special forces heading towards the hotel, and a few minutes later there was heavy gunfire and explosions," said witness Mahad Yare.
The Villa Rose is frequented by members of parliament and located in a secure central part of the capital just a few blocks from the office of Somalia's President Hassan Sheikh Mohamud.
Experts who spoke to VOA over the phone said they believe the attack can be seen as retaliation by the group after it lost significant ground in the Somali government's recent offensives against the Islamist militants in the country's central provinces.
Al-Shabaab, a militant group affiliated to Al-Qaeda that has been trying to overthrow Somalia's central government for 15 years, claimed responsibility for the attack.
Mohamed Dhaysane also contributed to this report.