The US State Department considers al-Shabab a terrorist organisation.
"The fighting was very heavy, Shabaab fighters attacked our military base outside Addado and we lost 15 men and six vehicles," Dahir Shidane, an army commander, told AFP.
"I don't know the casualties on the other side," he said.
Separately, armed men attacked a Somali governor in the southwestern region, killing two policemen and two civilians, witnesses said.
The attack occurred in Qasahdere town, 335km southwest of Mogadishu.
Islamic Court fighters also seized control this week of the central town of Buulo Burte, days after they briefly took control of Jowhar town, leaving a trail of fatalities.
Besides hit-and-run attacks on outlying towns in which they usually attack soldiers, free prisoners and voluntarily withdraw, the fighters launch near-daily attacks on government and Ethiopian forces in the capital.
Somalia has not had a functioning government since 1991, when warlords overthrew Mohamed Siad Barre, the Somali president. The impoverished country is awash with weapons and attacks on humanitarian workers are increasing.
Aid operation suspended
Doctors without Borders announced on Wednesday the closure of its operations in southern Somalia citing increased insecurity.
Work there had been suspended after the deaths of three staff members of the aid group.
The move comes only days after gunmen kidnapped two UN foreign workers.
"There is a significant need for independent humanitarian assistance, but we cannot continue working in a place where our staff deliberately targeted and brutally murdered," Arjan Hehenkamp of the Doctors without Borders said.
The medical agency will, however, maintain limited international staff in its camps within 10 other regions of Somalia.