Nigerian troops have driven Boko Haram extremists out of an abandoned north-eastern primary school in a shootout that killed four militants.
Insurgents were using the school as a transit camp until Sunday's attack, an army statement said.
Boko Haram - a nickname which means "Western education is forbidden" - has attacked many schools that have closed, been burned down or been abandoned in much of north-eastern Borno state.
The UN Children's Fund says more than 300 schools have been destroyed in an area where fewer than 30% of children are ever educated.
Nigeria's new president Muhammadu Buhari last week told NDTV, the New Delhi station, that negotiations to free nearly 300 girls kidnapped from a school last year in Chibok town have stalled because authorities have been unable to identify "credible" Boko Haram leaders to talk to.
Mr Buhari last month said the group they were negotiating with was demanding the release of a top bomb expert in exchange for some of the girls.
The UN Children's Fund says 10.5 million children are out of school in Nigeria - the highest number in the world - and that only half of children among 2.3 million refugees from the uprising are going to school in camps.