The first blast, outside the Nasa Hablod Two Hotel, near the Villa Somalia presidential palace, was followed by a second blast in the same area moments later, according to police Capt. Osman Mohamed.
The bombings were followed by a firefight, with at least three armed militants inside the hotel, police said.
Two attackers were killed and three others were in custody Sunday, Abdulaziz Ali Ibrahim, a spokesman with the security ministry told CNN.
The victims included former member of the Somali Parliament Abdinasir Garane, southwest region minister Madoobe Nuunow and a police official, according to Mohamed and Major Ahmed Ibrahim.
More than 40 others were wounded, Ibrahim said.
The gunfight erupted after the bombings, with at least three militants armed with AK-47s and machine guns holed up in the hotel, Ibrahim said.
Footage from the scene showed piles of rubble, and cars turned into a heap of mangled metal.
Terror group Al-Shabaab claimed responsibility in a statement posted on a pro-Al-Shabaab website.
On October 14, at least 277 people were killed in a double car bombing in Mogadishu, Somalia's Ministry of Information said.
About 300 people were wounded, including 40 people with injuries so severe they had to be airlifted to Turkey for treatment.
The first blast destroyed the popular Safari Hotel in the heart of the city.
Footage from the scene showed damaged buildings and a burning truck at the first blast site. A large white building had collapsed into a pile of rubble and other structures appeared blackened and destroyed.
Qatar's Embassy was also damaged, according to a statement from its Ministry of Foreign Affairs. The embassy's charge d'affaires suffered minor injuries, the statement said.