Military officials and local residents confirmed on Monday that the Takfiri outfit had detonated a car bomb in the Somali border town of Balad Hawo and then stormed the military base there, but were later driven out by the army after heavy fighting.
"We were awoken by a suicide car bomb this morning and then fierce battle followed," Major Mohamed Abdullahi told Reuters from the town.
"We lost at least 10 soldiers. We chased al-Shabab out of the town. We killed seven militants,” he added.
The official, however, warned that the death toll on both sides could still rise.
Ahmed Hassan, a resident of the Somali town, said, "Now Balad Hawo is calm and government forces fully control it," adding that he saw 13 bodies collected from the military base.
Al-Shabab, however, claimed it had killed 30 soldiers in the fighting and left the town after releasing 35 prisoners from the local jail.
The development came a day after at least six people were killed and several others injured in an al-Shabab bomb attack in central Somalia.
Al-Shabab is the dominant militant group in Somalia, a country in the horn of Africa that has been ravaged by decades of war and poverty. The militant group aims to oust the western-backed government in Mogadishu and drive out African Union peacekeeping troops.
Somalia has been the scene of deadly clashes between government forces and al-Shabab militants since 2006.
The Takfiri militant group was forced out of the capital by the African Union troops in 2011, but still controls parts of the countryside and carries out attacks against government, military and civilian targets.