Reports said four militants were involved in the attack, some of them have been shot dead.
Abdirahman Abdulqadir, the director of Aamin Ambulance service, tells The Associated Press that at least another 20 people have been injured in the attack.
"I felt the ground shaking under my feet", said resident Mohamud Yusuf, who was near the first blast.
A loud explosion reportedly took place on Friday, followed by a second blast and sustained gunfire which broke out near the president's residence.
Mogadishu: Two vehicle bomb blasts rocked Somalia's capital this evening, followed by gunfire, police said, and an ambulance service said at least 18 people had been killed.
Zagitova leads with world record short skate
Nagasu was ninth, with Chen 10th and Tennell 11th. "It's not a secret for anyone that I have the most hard program in the world". While the rest of her program was clean, Nagasu's chances for an individual medal to go with her team bronze were damaged.
Tiger Woods 'very pleased' with opening-round 70 at PGA National
Rickie Fowler is defending champion in a field that also includes two other local residents, Justin Thomas and Rory McIlroy . Originally created by George and Tom Fazio, it was the venue for the 1983 Ryder Cup and the 1987 PGA Championship.
McDonald's 'Rick and Morty' Szechuan sauce coming back to NYC
We did not anticipate the overnight crowds, the cross-state travel and the unbelievable curiosity, passion and energy fans showed. For this latest release, the fast food chain says 20 million packets will be available across all U.S.
The first explosion occurred near the country's intelligence headquarters, police Capt. Mohamed Hussein said.
Some sources report that the responsibility for the attack was assumed already by the radical Islamist group "Al-Shabab", a leading armed struggle against the government and obstructing humanitarian activities of the UN.
Mogadishu was the target of a truck bombing in October that killed 512 people in the deadliest attack in the Horn of Africa nation's history.
The second blast was a auto bomb parked in front of a hotel away from the palace. Militiamen assume that the vehicle was blown up by a suicide bomber. Three people have been killed.
Mogadishu - The United States military for the second straight day is announcing a drone strike that killed al-Shabaab extremists in Somalia.