The clashes appeared to be part of a local power struggle sparked by politicians meeting in Dhusamareb, in the north-central Galgadud region, aimed at forging a regional government.
The confrontation between soldiers and Ahlu Sunnah Wal Jamaah militia usually allied to the army erupted in the town of Guricel, 400 kilometres (250 miles) north of the capital Mogadishu.
"There was heavy fighting inside the town, it started in the outskirts but later spread," local leader and elder Abdulahi Muktar said.
"There were many dead. I saw the dead bodies of 16 people, three of them civilians."
Guricel resident Dahir Hussein said corpses were strewn in the streets, and that he had seen at least 14 wounded people taken to hospital.
"Fighting has stopped now and government troops were pushed out of the town, but there is still tension. We can hear sporadic gunfire in the suburbs of the town," Mohamed Dhabarey, another resident said.
Local Somali army commander Abdikarim Ali said that "more than 10" people had died, and that government troops had "made a tactical withdrawal."
Somalia has been unstable since the collapse of Siad Barre's hardline regime in 1991, with the country's internationally-backed government, along with African Union forces, currently battling Al-Qaeda affiliated Shebab rebels.
- Middle East Online