At least six people were killed when a suicide car bomb struck a local government office in central Mogadishu on Sunday, destroying the building and a Quranic school opposite.
Police said a car bomb parked in front of a restaurant at the busy street of Maka al Mukaram had exploded.
Al Qaeda-linked al Shabaab have used car bombs to target government buildings in the capital.
Witnesses said the explosion was caused by a car bomb on one of the capital's busiest streets that was packed with people heading home from work.
Somalia's extremist group al Shabaab set off a suicide car bomb at a security checkpoint about 15 km (nine miles) outside the capital Mogadishu on Thursday, the group's spokesman and a police official told Reuters.
A Somali military court on Tuesday sentenced to death a man convicted of driving a truck bomb as part of a deadly attack that killed more than 500 people in the capital, Mogadishu, in October, the national news agency reported.
Somali al Shabaab militants, who have carried out frequent bombings in the capital, Mogadishu, said a former leader who defected to the government side was an apostate who could be killed.
Police spokesman Major Mohamed Hussein said the attacker, with explosives strapped to his body, infiltrated the General Kahiye Police Training Academy and struck during a police parade.