Somali forces backed by AMISOM troops repulsed an attack by Al-Shabaab fighters on their bases in Bulo Burde, Hiiraan region early Tuesday.
According to a government official said that the militants launched an offensive on the bases leading to heavy clashes which lasted for about an hour.
The militants were however overpowered forcing them to retreat, the source said.
There were reports of casualties on both sides.
Al-Shabaab, which is fighting the southern part of Somalia routinely targets AU forces and government bases in the country.
Bulo Burde is situated along the Shebelle River and is the second largest town in Hiiran after the provincial capital Beledweyne.