At least three Somali soldiers were killed in a suicide bomb attack in Afgoye district, a town 30 km to the north west of the capital Mogadishu, police and militants said.
The attack was claimed by Islamist militants al Shabaab. Somali soldiers were deployed in Afgoye this week in efforts to tighten security in the town ahead of an expected visit by President Mohamed Abdullahi Farmaajo.
"Police and military fired at a speeding suicide car bomb today and it exploded in Afgoye district. So far we know three soldiers died," Captain Nur Ali, a police officer, told Reuters by phone from Afgoye.
Al Shabaab claimed responsibility for the attack, citing a higher death toll than the police.
"A suicide car bomb targeted Somali forces who were deployed ahead of president Farmaajo’s visit in Afgoye. We killed 11 soldiers," Abdiasis Abu Musab, al Shabaab’s military operation spokesman, told Reuters on Sunday.
In a separate incident, Somali forces killed two militants after fighting erupted briefly at a checkpoint in Mogadishu early Sunday, police said.
"Somalia's military killed two armed militants at Benadir checkpoint. Two soldiers were slightly injured in the exchange of fire," Major Mohamed Abdullahi, a police officer, told Reuters.
Somalia has been convulsed by lawlessness and violence since 1991 when dictator Mohamed Siad Barre was toppled.
Al Shabaab is fighting to dislodge the western-backed central government and African Union-mandated peace-keeping force AMISOM, which defends it, and install its own government based on its strict interpretation of Islamic sharia law.