FILE PHOTO: Relatives wait for bodies to be removed from the destruction at the scene, a day after a double car bomb attack at a busy junction in Mogadishu, Somalia on Oct. 30, 2022. AP
The information ministry said that a senior military commander was among those killed after the Islamist militants stormed the camp 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, adding that "the site is now under the full control of the Somali forces".
Al-Shabaab said it was behind the attack, claiming its fighters had overrun the camp and killed more than 150 soldiers.
"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."
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.
New phase of offensive
In a significant blow to Al-Shabaab, the Somali National Army and local clan militias on Monday captured of the strategic Indian Ocean port town 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.
But despite the gains, Al-Shabaab -- which has been waging a bloody insurgency against the central government for 15 years -- has demonstrated the ability to strike back with lethal force against civilian and military targets.
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.
"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 help flush out members of the jihadist group he described 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.