African Union and Somali troops launched an offensive this year that has driven al Shabaab out of its last major strongholds.
Monday’s attack highlights the challenge of halting guerrilla-style raids by the al Qaeda-aligned group.
“Al Shabaab attacked our military forces at 3 am” in the Lower Shabelle region, Somali military officer Aden Nur said.
“They killed 10 soldiers and burnt two military vehicles [equipped] with anti-aircraft guns.”
Sheikh Abdiasis Abu Musab, Al Shabaab’s military spokesman, said the group was behind the attack and said 14 Somali soldiers had been killed and three vehicles had been burned.
Al Shabaab often cites a higher death toll than the number given by officials.