An Al-Shabaab attack killed seven soldiers Friday at a military camp in a Somali town retaken by the army this week in a major offensive against the jihadist group, the government said.
The information ministry said a senior special forces commander was among those killed after the Islamist militants stormed the base in Galcad, a town in central Somalia about 375 kilometres (230 miles) north of the capital Mogadishu.
More than 100 fighters from the Al-Qaeda affiliated group were killed, it added.
The information could not be independently verified.
"There was heavy fighting there in which the (jihadists) were defeated," the ministry said.
"Seven soldiers among them a military commander from the Danab brigade (an elite commando unit) were martyred in the fighting and the site is now under the full control of the Somali forces."
Al-Shabaab said it was behind the attack and claimed a large number of casualties.
"The Shabaab gunmen blasted two trucks loaded with explosives before face-to-face fighting started," Abdilahi Rage, a resident of Galcad, told AFP by telephone.
"They briefly managed to push back the troops out of the camp, but reinforcements came and they have retreated."
- 'Historic victory' -
On Tuesday, Al-Shabaab launched a deadly attack on a military base in another part of central Somalia, just a day after the government claimed a "historic victory" over the jihadists.
In a significant blow to Al-Shabaab, the Somali National Army and local clan militias on Monday captured the strategic Indian Ocean town of Haradhere as well as Galcad, both without a fight.
Haradhere had been a key supply route for Al-Shabaab for both people and goods after it seized the port in 2010, dislodging local militias and pirates.
In recent months, the army and the militias known as "Macawisley" have retaken chunks of territory in the central Galmudug and Hirshabelle states in an operation backed by US air strikes and an African Union force.
Al-Shabaab has been waging a bloody insurgency against the central government in the fragile Horn of Africa nation for about 15 years.
And despite the gains by the pro-government forces, the militants have continued to demonstrate the ability to strike back with lethal force against civilian and military targets.
"Galcad is a significant attack given the scale of violence and overall casualties, but also as it occurred in an area government forces had recently seized," International Crisis Group's senior analyst for eastern Africa, Omar Mahmood, told AFP.
"Notably, the militants also targeted an area where Somali special forces where located."
- New phase of offensive -
On Tuesday, President Hassan Sheikh Mohamud, who declared "all-out war" on the jihadists after taking office in May last year, said the offensive would expand to South West State.
"Somalis have just one enemy and that enemy is Al-Shabaab. They are killing us and we are killing them," he said, calling on young men fighting with the group to surrender.
"The government has plans to liberate the whole country from A-Shabaab," he added. "The first phase is nearing completion, and the second phase will begin in the South West State of Somalia."
Last week, he had called on ordinary Somalis to rise up against the jihadists, describing them as "bedbugs".
Although forced out of Mogadishu and other main urban centres more than a decade ago, Al-Shabaab remains entrenched in parts of rural central and southern Somalia.
In the deadliest Al-Shabaab attack since the offensive was launched last year, 121 people were killed in two car bomb explosions at the education ministry in Mogadishu in October.
The group has also been active recently across the border in eastern Kenya, which is a contributor to the African Union force in Somalia, carrying out several deadly small-scale attacks.