Uganda's military said on Monday it had lost 12 soldiers in an attack claimed by Shabaab militants in southern Somalia.
The Al-Qaeda linked insurgents ambushed Ugandan troops that are part of an African Union force as they patrolled a supply route in the hotly-contested Lower Shebelle region, the military said in a statement.
"From the battlefield, it is now confirmed that UPDF lost 12 gallant soldiers with seven sustaining injuries," the statement from the Uganda Peoples' Defence Forces said.
Witnesses told AFP the attack occurred in the village of Golweyn, some 120 kilometres (74 miles) from the capital Mogadishu.
The AU mission AMISOM said an improvised explosive device (IED) was used in an ambush of a convoy composed of its troops and Somali forces.
"A lot of damage was inflicted on the enemy while our troops took fatalities whose number is yet to be ascertained," the mission said on Twitter.
A Shabaab spokesman on Sunday told a radio station linked to the group that the insurgents had killed 39 soldiers, a claim that could not be independently verified.
The AU has a 22,000-strong force in the country dedicated to fighting Shabaab and supporting the internationally backed government.
Shabaab has fought governments in Mogadishu for years and has also carried out attacks in Kenya and Uganda.