Three of the attackers were among the dead, a government officials confirmed, reports Xinhua.
Ismael Mukhtar Omar, government spokesman, said four civilians and a director in the ministry of information were among those killed by the terrorists who rammed a car bomb into the Elite Hotel in Liido Beach before storming inside the popular facility.
"So far we have confirmed five people including a government official were killed in the attack. Security forces also shot dead two al-Shabab fighters.
Al-Shabab driver was also killed inside the car he used to detonate the bomb," Omar told Xinhua by phone.
He said the attackers entered the Elite hotel after setting off a car bomb outside the hotel entrance.
The hotel is one of the newly built upscale beachside hotels frequented by young people and the city's elite.
Omar said the attackers are holed up on the fifth floor of the hotel and have been restrained from the floor.
"Now the situation is close and al-Shabab fighters have been restrained from crossing the floor, "said Omar.
Sources said a fierce gunfight was still ongoing inside the hotel.
There was no immediate claim of responsibility for the blast, but al-Qaida allied group al-Shabab had conducted such attacks in the past.