Nigerian government troops have cordoned off an area in northwestern Kathmandu where gunmen are believed to have taken school children hostage.
It is not clear how many students were abducted and how many fled during the attack and have not yet been identified.
About 800 children are enrolled in all-boys schools, and about half remain unaccounted for.
Aide to President Mohammed Buhari said the attackers were thought to be seeking ransom.
The government has blamed the attack on robbers, which is a loose word for gangs operating in the area.
Amnesty International says more than 1,100 people have been killed in the first six months of this year in northern Nigeria. The government failed to bring the perpetrators to justice.
BBC Nigeria correspondent Mayeni Jones says there is growing concern about insecurity across Nigeria.
Liberation kidnappings, insurgent Islamist insurgency in the north-east and attacks on oil facilities in the south have hit the north-west.
Reuters news agency reported that parents had gathered at a school in the Kangaroo area, asking authorities to help find their children.
Abubakar was quoted as saying that two of his three sons were missing from the school, known as the Government Science Secondary School.
More than 300 children are still missing, a state official said.
Osama Aminu Male, a student who escaped from his captives and returned to his parents, told the AFP news agency that hundreds of students had been abducted.
“After they picked us up, we stopped inside the bus, where they persuaded the senior students to take the head count. We counted 520,” said the 18-year-old student.
The hostages were divided into groups before Mr. Mall and four others escaped.
“When I failed to communicate with the rest of the group because of poor health, one of the gunmen repeatedly beat me, giving me a chance to escape before I could be allowed to retreat,” he said.
‘Robbers Will Be Destroyed’
The army said it found the gunmen’s hideout in the woods and opened fire.
A spokesman for the president, Garba Shehu, told the BBC that troops had been deployed on a large scale to rescue the abducted children.
“Military commanders have coordinates who believe where the robbers are, they catch someone. They surround the whole area,” he added.
President Buhari is from the state and is currently on a private visit.
Shehu said he was informed within hours of attempts to rescue the children.
“Criminal elements, robbers will be destroyed and they will be eliminated,” he added.
The children believe their 10 classmates were taken by robbers, but this still needs to be checked, Shehu added.
School officials are talking to parents to establish how many students have returned home after escaping the attack and how many are still scattered over a large area.
Residents near the school told the BBC they heard gunfire at 23:00 (22:00 GMT) on Friday and that the attack lasted more than an hour.
Authorities said security officers at the school were able to repel some of the attackers before reinforcing police.
Police said some of the gunmen were forced to retreat during the firefight. She said students were able to measure the school fence and run to safety.
You may also be interested in:
Several locals joined police in search of students, and many parents said their children had been withdrawn from school.
“The school is deserted and all the students have been evacuated,” Noora Abdullah, a witness, told AFP news agency.
Katsina Governor Aminu Bello Mazari has ordered the closure of all boarding schools in the state.