Gen. Yusuf Rage, commander of the Somali infantry division, said that troops repelled the attack in Awdhegle, a farming town recently seized by Somalia's special forces. Eight attackers were also killed in the attack.
Al-Shabab claimed responsibility for the assault which started with a suicide car bomb.
Residents told The Associated Press that loud explosions and bursts of gunfire were heard for nearly half an hour. They said government forces were still in control of the town.
"Al-Shabab have left after the fighting," said Yusuf Anshur, a local elder. "The situation is calm now."
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.