There was no immediate claim of responsibility for the attack which took place late on Wednesday, but it appeared to involve a commando of gunmen, and bore all the hallmarks of Somalia's Al-Qaeda-linked Shebab group.
"The number of dead is 11, with 18 others who were wounded," police commander Abdi Mohamed Jama said.
"However, the situation is now back to normal, mine experts have cleared the area for any possible explosive devices."
The first car bomb exploded outside the Jazeera hotel, near the international airport. It is one of the seaside capital's most upmarket and its clientele includes Somali politicians and visiting foreign officials.
More From This Section
Eyewitnesses also reported an intense exchange of gunfire between assailants and security officers between the back-to-back blasts.
But the police boasted that they had stopped the attackers from killing more.
"The terrorists failed to achieve their objective as security forces foiled their attacks," Somali police spokesman Mohamed Omar told reporters, adding that two fellow officers were among the dead.
The attack was similar to others carried out by the Shebab in Mogadishu, with a first car bomb smashing through the well-guarded gates of a target to let in a suicide commando and sometimes another explosives-laden vehicle.
African Union troops -- including large contingents from Uganda, Kenya and Burundi -- have since recaptured every major insurgent bastion and tried to prop up Somalia's fledgling government forces.
But a string of devastating Shebab attacks against foreign and government targets have shattered hopes of a rebirth for the war-ravaged capital and demonstrated that the Islamist outfit's disruptive power was undiminished.
The group, which has become a magnet for foreign jihadists, has carried out an average of one "complex attack" every six or eight weeks over the past year.