The Nigerian military had located and exchanged fire with gunmen who kidnapped scores of secondary school students in northwestern Katsina state, according to a statement from the president on Saturday.
The gang, armed with AK-47s, stormed the Government Science secondary school in Kankara district at about 9:40 p.m. on Friday, police and locals said. A parent and school employee told Reuters that roughly half of the school's 800 students were missing.
President Muhammadu Buhari said in a statement that the military had located the kidnappers in a forest and was exchanging fire with them, aided by air support.
In the statement, Buhari condemned the attack in his home state. Police and the military were still working to determine how many were kidnapped and missing.
Police at the scene on Friday exchanged fire with the attackers, allowing some students to run for safety, police spokesman Gambo Isah said in a statement.
Police said they would deploy additional forces to support the search and rescue. One officer was shot and wounded in the exchange of fire with the gang, they said.
Katsina is plagued by violence the government attributes to bandits - a loose term for gangs of outlaws who attack locals and kidnap for ransom. Attacks by Islamist militants are common in northeastern parts of the country.
Violence and insecurity across Nigeria have enraged citizens, particularly after scores of farmers were killed, some beheaded, by Islamist militants in northeast Borno state late last month.
Buhari, who arrived on Friday for a week in his home village some 200 km (125 miles) from Kankara, was scheduled to brief the national assembly on the security situation last week, but cancelled the appearance without official explanation.