A suicide car bomb killed three security guards and injured several more people in the heart of the Somali capital Mogadishu on Sunday, authorities said.
Islamist extremists of the Al-Shabaab movement immediately claimed responsibility for the attack.
"There was a car bomb blast targeting the district administration offices and three people died and several others wounded," Mogadishu administration spokesman Salah Hassan Omar told reporters at the scene.
He said the dead were security guards at the building's main entrance where the blast occurred.
Witnesses said the explosion destroyed the building.
"The blast was very huge, it affected several nearby buildings including a Koranic school and a mosque," said witness Abdukadir Dahir.
"Eight people were wounded among them several students who stayed at a nearby madrasa," he added.
The militants' claim came in a brief statement posted on a pro-Shabaab website.
"The Mujahedeen attacked the headquarter of the apostate administration... using a vehicle loaded with explosives, there are casualties," it said.
Somalia suffered the worst terror attack of its history in October last year.
More than 500 people were killed in Mogadishu in a truck bombing attributed to Al-Shabaab.
The Islamists, forced out of the capital in 2011, are fighting to overthrow the internationally backed government. They still hold sway over vast rural areas.
A 20,000-strong African Union Mission in Somalia (AMISOM) was deployed in 2007 under a UN mandate to shore up the government.