Suicide bomber blew himself up at the gates of the presidential palace in the Somali capital Mogadishu on Monday but there were no other casualties, police said.
Police spokesman Osman Aden told Reuters the bomber tried to jump onto an armored vehicle driving into the palace that was part of a convoy of peacekeepers.
The peacekeepers fired at the bomber to stop him jumping onto the vehicle and he detonated his device, Osman said.
It was not immediately clear whether any other casualties resulted from the attack, which took place as a convoy of the African Union mission in Somalia (AMISOM) was entering the compound.
A government official who refused to be named could not confirm whether President Sharif Sheikh Ahmed was in the palace at the time of the attack.
He said he was checking information that a second attacker might still be at large in the area.
The brazen attack came less than two weeks after a suicide squad from the al-Qaeda-inspired Shabab, an insurgent group bent on toppling Sharif, attacked Mogadishu’s international airport.
Their operation was thwarted by The African Union Mission in Somalia (AMISOM) before they could reach the airport’s passenger terminal and resulted in the deaths of five attackers, two members of the African force and three civilians.
On August 24, two Shabab gunmen stormed a hotel in the government-controlled part of the Somali capital that usually houses members of parliament and other officials.
The two militants blew themselves up, leaving a total of 32 people dead, including four lawmakers, following the shooting rampage.
Security sources in Mogadishu say that the Shabab, whose leadership last year proclaimed its allegiance to Osama bin Laden, has a safe house in Mogadishu with suicide bombers ready to be deployed at any moment.
Observers have argued that the Shabab were increasingly resorting to spectacular suicide operations against high-value targets because the offensive they launched in May 22D9 was failing to break AMISOM’s defenses.
The African force, which currently consists of 7,200 troops from Uganda and Burundi and was first deployed in March 2007, is the last barrier preventing the insurgents from taking full control of Mogadishu.
AMISOM, whose job has been mainly to protect Sharif and his transitional federal government (TFG), has been calling for further troop contributions and a more robust mandate that would allow it to go after the Shabab.
Speaking to reporters in Mogadishu on Sunday, Prime Minister Omar Abdirashid Sharmarke praised AMISOM and government troops for fending off the Islamist insurgent offensive and called for scaling up the fight.
"We also have to think of another option, an option of opening a new front different from Mogadishu and … opening fronts in central regions, Bay and Bakol, from the (southern) Juba land areas," he said.
The Shebab currently control most of the country but the premier said the long-awaited nationwide offensive could take place by year’s.