Fighters from Somalia's armed group al-Shabab have attacked an army base southwest of the capital, Mogadishu, killing at least 10 soldiers, the group and a military officer told the Reuters news agency.
The attackers rammed a car packed with explosives before storming the base, some 50km outside Mogadishu, on Monday morning.
"A suicide car bomb rammed into the base and then al-Shabab fighters stormed it. At least 10 soldiers died," Major Ahmed Farah told Reuters from the nearby town of Afgooye.
Farah said "heavy exchange of fire continued for hours", adding that at least 12 al-Shabab fighters were killed.
An al-Shabab spokesman told Reuters at least 30 Somali soldiers had been killed in the raid, but did not mention any al-Shabab casualties.
The armed group often cites a higher death toll than official figures.
Al-Shabab often launches attacks on Somali security forces, officials and army bases in an effort to topple the government and impose its own brand of government on Somalia.
On Sunday, more than 100 members of al-Shabab raided a police station in northeast Kenya overnight, wounding one officer and making off with arms and ammunition, according to police.