A suicide bomber in a car has killed seven people near the home of Ali Mohamed Gedi, the Somali prime minister, in the capital Mogadishu, but he has escaped unhurt.
Security sources said the blast injured an unknown number of people.
"Prime Minister Gedi was unhurt. The vehicle exploded outside the gate of his house," a police officer at the scene said.
Paddy Ankunda, a spokesman of the African Union peacekeeping force in Mogadishu, said Gedi had been taken to a safe location.
He said: "We don't how the suicide bomber managed to pass through undetected ... The wounded cannot be counted," the officer told Reuters.
Buildings flattened
A security source close to the prime minister said seven people were killed, including five soldiers guarding the residence. The blast flattened other buildings in the area.
Gedi's interim administration is struggling to impose its authority on the anarchic Horn of Africa nation.
A witness at the scene said an Islamic school was among the buildings damaged in the explosion. "No one knows what happened to the children inside," he said.
Ankunda said that a number of people were killed and others wounded.
He said African Union troops are busy evacuating the wounded.
Ankunda said that within minutes of the explosion, peacekeepers sealed off the area around Gedi's house and took charge of security.
Qasaye Mohamed Ali, who lives in the neighbourhood, said he was standing near the prime minister's house when he saw the car force its way through a roadblock.
Guards outside opened fire and then the car rammed into a wall and exploded, he said.