Somalia's government and al-Shabab fighters both claim more than 100 people have been killed in their deadliest battle since the government launched a major military offensive against the extremists in August.
The government in a statement asserted that more than 100 al-Shabab extremists died after they attacked a Somali National Army base in the Galgudud region village of Galcad that was recently retaken from the fighters' control.
The government statement said seven soldiers, including an officer from the elite, US-trained Danab brigade, were killed in the "intense attack" but asserted that the military remained in control of the base.
The government expressed gratitude to international allies that assisted in the battle.
A spokesman for the al-Shabab rebels, Sheikh Abu Musab, asserted that more than 150 Somali soldiers and officers were killed.
Neither side's claim could be independently verified but Galcad resident Abukar Uluso told the Associated Press there was heavy gunfire exchanged.
"It was during the dawn prayer when I heard the sound of explosions followed by an exchange of gunfire," Uluso said.
"Most fatalities were among the two sides and the civilian casualties are minimal since the attack took place inside the army base."
Somalia's government last year declared "total war" against al-Shabab.
The extremist group has thousands of fighters and has long held parts of central and southern Somalia, and often carries out high-profile attacks in the capital Mogadishu.
The government in recent months claimed success in retaking many communities during what has been described as the most significant offensive in more than a decade.
Security analysts have warned that holding the territory will be a challenge.