Bama, in the north-eastern state of Borno, was retaken from Boko Haram last week.
Spokesperson for the military, Chris Olukolade, a Major General, said that over 20 militants died while others fled with wounds.
He said many more of the attacking terrorists also died as air patrol went after the fleeing ones.
He said the pursuit of the terrorists was still ongoing while calm had been restored and troops maintained firm control of Bama town.
“A Hilux vehicle as well as other equipment and some weapons were captured from the attackers,” Mr. Olukolade said.
“One soldier died while seven were wounded while repelling the attack.
“They have been evacuated from the combat area by air and are already receiving medical attention,” he said.
Mr. Olukolade said most of the towns slated to be cleared of terrorists were already covered.
He said the campaign to rid rest of the communities of Boko Haram with continued air and land operations had been stepped up in the remaining designated locations.
He added that cordon and search of cleared communities were also ongoing with some discoveries of weapons and vestiges of atrocities committed by the terrorists while they held sway in some locations.