According to police, at least 14 people, including eight civilians were killed during the siege.
Militants belonging to the al-Shabab group, which claimed it was behind the attack on the Villa Rays hotel, were hiding in one of the rooms.
Witnesses reported to the BBC that they heard shots and explosions coming from the hotel.
Somali police reported that 60 people were rescued in the hotel, located near the presidential palace.
Sadik Dodishe, spokesperson for police, confirmed that in addition to the eight civilians who were killed during the siege, one soldier was also killed along with five al-Shabab fighters.
Villa Rays Hotel, also known by the name Villa Rose, is very popular among government officials. Many ministers confirmed that they were rescued.
Mohamed Ahmed, a minister, is believed to have sustained injuries. Adam Aw Hirsi the Environment Minister, however, claimed that he was able to survive the attack.
BBC interviewer Mr Hirsi describes the impact of the initial blast. He said: “We were praying evening prayers in the small mosque of the hotel when there was this huge explosion, deafening, massive that shattered all glass, and that shaken the foundation of our building.
“We had 120 seconds between the explosion and terrorist foot soldiers coming as soon as it took place,” he said.
Police officers reported that there were unknown numbers of assailants armed with guns or explosives who were involved.
One eyewitness said that she heard a loud blast followed by heavy gunfire.
Ahmed Abdullahi who is close to the scene told the news agency that they were “shaken”. “We are only indoors, listening for gunfire.”
Mohammed Abdi, a Police Officer, said that Villa Rays officials were saved after they tried to flee through windows.
After an attack on a popular Mogadishu Hotel, President HassanSheikh Mohamud declared “total War” in August. This was three months after he took office. More than 20 people perished in the attack on another Mogadishu hotel.
Two months later, two car bomb explosions in Mogadishu near a busy intersection killed at least 100. Al-Shabab also stated that it was responsible for the attack.
President Mohamud then mobilized the Somali Army and government-backed clan militias to try and take villages from al-Shabab. Al-Shabab controls large swathes across the country.
Al-Shabab is still waging war in Somalia’s central and south despite recent government troops being supported by African Union forces, local militias and the retaking of areas previously seized by the group.
Andrew Harding BBC Africa correspondent recently spent some time with the so-called lightning brigade. This brigade is funded by the US, and plays an important role in the uprising versus al-Shabab.
The central goal of the militant group was to overthrow Somalia’s government and create its own rule, based on strict Islamic law.