The army said the children and staff were rescued following "carefully planned and executed" operations.
Nigerian security forces suffered "casualties" during the rescue of over 40 kidnapped schoolchildren and teachers, the army said Saturday, in an operation that put an end to a major security crisis in the country's relatively safe southwest.
The pupils, whose rescue was announced Friday, were seized from three schools in Nigeria's Oyo state and had been in captivity for nearly two months.
The army said the children and staff were rescued following "carefully planned and executed" operations alongside intelligence agencies, police and local vigilante groups.
"However, there were some casualties on the part of the security forces," it said, without elaborating.
The shock kidnapping, in Oyo's Oriire local government area, was blamed on terrorists.
President Bola Tinubu said the attackers were militants from Ansaru, a Boko Haram splinter group known to operate in central Nigeria, extending into the southwest.
‘Mental torture’
"I was almost shedding tears yesterday when I saw them. It was mental torture," Abdulfatai Buhari, a senator from Oyo state, told AFP, noting there were two and three-year-olds among those kidnapped.
Nigeria has been fighting terrorists in the northeast. But the attack in Oyo state sent shockwaves through a country where many had long written off such violence as a problem contained in the north.
Southwest Nigeria -- home to economic capital Lagos -- has long been considered one of the safest regions in a country struggling with multiple security crises.
Oyo is one of Nigeria's most populous states, and its capital, Ibadan, is a major education hub.