Boko Haram gunmen stormed the Mohammed Kur Barracks in Bama early Friday, spraying it with bullets before torching the compound.
"Although a good number of the insurgents escaped with bullet wounds while some have been arrested, over 50 of them died in the course of exchange of fire with ground troops in the ongoing operations to apprehend fleeing terrorists," Major General Chris Olukolade said in a statement yesterday.
"A total of five civilians also died during the attack," he said.
Olukolade said the military destroyed over 20 vehicles conveying fleeing Boko Haram fighters.
More From This Section
"The vehicles were the ones used during the attack on the barracks and were sited through air surveillance as the terrorists were making efforts to cross the borders back to their haven in Cameroun," he said.
He said the military would continue to search for more insurgents who might be on the run.
Olukolade said the families affected by the attacks had been relocated to other military locations.
In November, Human Rights Watch reported that Boko Haram has increasingly used kidnappings as a tactic, abducting scores of women and children this year.
The Bama attack was the second major Islamist assault on the army this month, casting further doubt on official claims that the rebels have been weakened by a seven-month-old military offensive in the northeast.
Boko Haram, declared a terrorist organisation by the United States last month, is fighting to create in Islamic state in Nigeria's mainly Muslim north. The conflict has killed thousands since 2009.
Nigeria has extended the emergency measures through to May in a bid to permanently crush the insurgency.