
Police say that at least 14 people died during the siege, eight of them civilians.
Al-Shabab militants, who claimed to be behind the attack, were holed up in one room in Villa Rays hotel.
Witnesses claimed that they heard gunshots and explosions from the hotel.
Somali police claim that 60 people were rescued at the hotel near the presidential palace.
Sadik Dodishe, a police spokesperson, confirmed that one soldier was also killed during the siege along with eight civilians.
Villa Rays, also known as Villa Rose, is a popular hotel among government officials. Several ministers have confirmed that it was saved.
Mohamed Ahmed, at least one minister, was reported to be injured, while Adam Aw Hirsi (Environment Minister) told reporters that he had survived.
According to Mr Hirsi, the BBC’s official correspondent, the blast had an impact on the evening prayers. “There was a loud explosion that deafeningly shook the foundation of our building where we were meeting.
He continued, “As soon the explosion occurred we had a 120 second leeway between it and the terrorist foot troops coming.”
According to police officers, there was an unknown number of attackers armed with guns and explosives.
One eyewitness reported hearing a “huge explosion, followed by heavy gunfire.”
Ahmed Abdullahi, a local resident, said that “we were shaken.” “We are indoors listening to gunfire.”
Mohammed Abdi, a police officer, stated that some government officials were saved from Villa Rays by using windows to escape.
Three months after taking office President Hassan Sheikh Mohamud promised “total war” on Islamist militants in August following an attack at another Mogadishu hotel. More than 20 people were killed.
Two months later, at least 100 people were killed in twin car bomb explosions close to a busy intersection in Mogadishu. Al-Shabab also claimed it was behind the attack.
In an attempt to seize villages and towns from al-Shabab which holds large areas of the country, President Mohamud mobilized the Somali army and clan militias that were backed by the government.
Al-Shabab continues to attack central and southern Somalia, despite the recent support of government troops by African Union forces as well as local militias that retook areas previously held by the group.
Andrew Harding is a BBC Africa correspondent. He recently spent time with the “lightning brigade which is funded by America and plays a central part in the uprising against al Shabab.
The main goal of the militant group is to overthrow Somalia’s government, and establish its own rule that adheres strictly to Islamic law.