A car bomb exploded at the main gate of the Sahafi Hotel early on November 1, with attackers then storming the hotel as they exchanged gunfire with security guards, police say.
A suicide bomber detonated a second set of explosives inside the hotel.
African Union troops and government forces say they have regained control of the hotel after a fierce gun battle.
The Sahafi Hotel is popular with Somalia’s members of parliament.
A website associated with al-Shabab claimed responsibility, saying that fighters from the al-Qaeda linked group had infiltrated the hotel after an explosion.
Those killed in the attack included parliamentarian Mohamed Abdi Abtidoon and a freelance photographer.
Several prominent people were among the injured, including a journalist and a local businessman.
Medical sources confirmed that a top Somali military commander, General Gacma Duule, and Somalia’s ambassador to Ethiopia, Abdisalam Haji Adam, were also injured.
The attack comes a day after deadly clashes between jihadist fighters and African Union (AU) troops in the Bakool region near the border with Ethiopia.
The AU is helping the government battle al-Shabab, which is linked to al-Qaeda.
Security in Somalia has improved, but al-Shabab still attacks Mogadishu regularly.
The militants have also targeted neighboring countries, killing almost 150 people in an assault on Garissa University College in Kenya in April.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…