At least six people were killed when a suicide bomber blew himself up amongst a group of security officials outside the Somali prime minister’s office on Tuesday, army officials said.
It is believed that many of those killed or wounded were soldiers or police.
Prime Minister Abdi Farah Shirdon Said was in his office at the time when the attacker struck, officials in his office said, but he was not harmed by the blast.
No group immediately claimed responsibility for the blast, but the Al-Qaeda linked Shebab insurgents have conducted a series of guerrilla style attacks in the capital.
The insurgents have vowed to topple newly elected President Hassan Sheikh Mohamud, who took office in September after being chosen by the country’s new parliament, bringing an end to eight years of transitional rule.
Shebab fighters are on the back foot, having fled a string of key towns ahead of a 17,000-strong African Union force, which is fighting alongside Somali government troops to wrest territory off the Islamists.
Ethiopian troops are also battling the Shebab in the southwest of Somalia.
But the Shebab remain a potent threat, still controlling rural areas as well as carrying out guerrilla attacks — including suicide bombings — in areas apparently under government control.
War-ravaged Mogadishu was hit last year by a string of bloody bomb attacks, although it has been more calm in recent weeks.
A car bomb in December killed three people, while in November a suicide bomber attacked a restaurant.