The clashes on Monday started after al-Shabab members, who control the port town of Harardhere, tried to impose taxes on its residents.
Security forces also reportedly backed the locals in clashes with the fighters in Dumaaye village and other areas near Harardhere.
The Associated Press quoted resident Ahmed Mohamed as saying 10 people, including six fighters and four residents, were killed in the fighting.The DPA news agency quoted Osman Isse Nur, a regional security minister, reporting 30 deaths, including those of 26 al-Shabab fighters.
Harardhere's inhabitants, who are already struggling economically after losing hundreds of livestock in the current drought, dismissed the demand for taxes, leading to fighting between the two sides.
DPA also quoted an anonymous senior official as saying locals "took up arms against al-Shabab fighters who want to loot their resources, including livestock".
Villagers ambushed al-Shabab members travelling near Harardhere on Monday afternoon, and destroyed one armoured vehicle, another resident told AP on condition of anonymity.
He also said fighters burned down homes in Dumaaye.
Civilians have rarely resisted al-Shabab, which carries out executions to impose its authority.
More than 22,000 peacekeepers are deployed in Somalia in the multinational African Union force.
Despite being ousted from most of its key strongholds in south and central Somalia, al-Shabab continues to launch deadly guerrilla attacks against the Somali government and African Union forces across large parts of the horn of Africa nation.