Nigeria's troops have a foiled a planned Boko Haram attack on a camp of displaced people in the northeastern town of Dikwa, previously targeted by the insurgents, the military said.
"From all indications, the terrorists aimed at causing havoc at the Internally Displaced Persons (IDPs) camp located at Dikwa," army spokesman Colonel Sani Usman said in a statement late Wednesday.
He said security forces "decisively dealt with the terrorists", killing 26 of the extremist militants and seizing weapons and ammunition.
One soldier and a local vigilante assisting the military in the fight against Boko Haram were killed, he said.
Usman said three soldiers and four IDPs were injured in the encounter, adding that anti-aircraft guns, assault rifles and explosives were among the weaponry recovered.
"The casualties have since been evacuated while the troops have been pursuing those terrorists that escaped with gunshot wounds," he said.
Boko Haram, which has increasingly used suicide and bomb attacks as the military pushes them out of territories it once controlled, has previously hit Dikwa, some 90 kilometers (50 miles) from Maiduguri, the birthplace of the sect.