Gunmen from the Islamic State West Africa Province, the IS-linked faction of Boko Haram, attacked the base in Nigeria’s northeastern Borno state on Friday.
“We have recovered five bodies of soldiers who paid the supreme price fighting the terrorists,” a military officer told AFP, giving the first reports of casualty numbers.
“Search and rescue teams are still looking for around 30 more soldiers who have gone missing since the attack,” the officer added.
ISWAP fighters on Friday launched an assault on the base at Mararrabar Kimba, 135 kilometres (85 miles) from the state capital Maiduguri.
The fighters, reportedly driving over a dozen pickup trucks with heavy machine guns welded onto the back, were accompanied by three armoured personnel carriers and flanked by a fleet of gunmen firing from motorbikes.
Some soldiers scattered into the bush to escape.
A second officer confirmed the toll of five dead.
“There are high hopes the missing soldiers will be found — or will find their way back,” he added. “We are not thinking of the worst scenario.”
There was no immediate official response from the army.
The decade-long jihadist conflict has killed tens of thousands of people and forced millions from their homes.
The violence has spread to neighbouring Niger, Chad and Cameroon, prompting a regional military coalition against the jihadists.
In recent weeks, coalition forces involving Nigeria, Chad and Cameroon have been pounding insurgent hideouts in the Lake Chad areas with airstrikes, as well as launching ground assaults.
The ISWAP faction split from the main Boko Haram group in 2016, but there are reports the two groups might be merging back together.
Nigerian army chief Lieutenant-General Tukur Buratai last week warned of an ISWAP-Boko Haram alliance to carve out a jihadist enclave stretching from Nigeria’s northeast into the wider Lake Chad region.