The 344 boys, whose abduction was claimed by the Islamist militant group Boko Haram, were on their way back to Katsina, Aminu Masari told the state broadcaster on Thursday.
“At the moment, 344 of the students have been handed over to security agents. I think we have recovered most of the boys if not all of them,” he said.
“By tomorrow we will get them medically examined and then arrangements will be on the way to reunite them with their families.”
But it was not immediately confirmed if the group included all the boys who were taken in the raid last Friday on a rural school in Kankara. More than 800 students were at the Government Science secondary school when it was attacked last week by armed men, but hundreds escaped.
In the rescue operation, security forces had cordoned off the area where the boys were being held and had been given instructions not to fire a single shot, he said.
“We had already established indirect contact to try to make sure that we secure the release of the children unharmed,” Masari said. “We thank God that they took our advice and not a single shot was fired.”
Masari said the government will be “working with the police and also to engage private security firms to safeguard schools” to prevent the “ugly experience of the last six days”.
Nigeria’s president Muhammadu Buhari welcomed the release of the students.
His spokesman Garba Shehu said on Twitter that Buhari described their safe return as “a big relief to their families, the entire country and international community”.
“President Buhari specifically cited what he called the ‘spirit of partnership and the collaborative efforts of the government of Katsina, Zamfara and military leading to the release’,” he wrote.
“The Governor, Aminu Bello Masari, and the army worked extremely hard. As soon as I got the information I congratulated them. The Armed Forces know their job. They have been well trained and properly motivated.”
Nigeria’s government routinely denies widespread suspicions that it has paid ransoms to kidnappers, including in the case of more than 100 schoolgirls seized in 2014 from the town of Chibok.
After the boys’ medical examinations in the morning, they would meet with Buhari, and be reunited with their families, local government officials said.
The raid was initially blamed on bandits who have terrorised the region for years, but on Tuesday Boko Haram claimed responsibility. Kankara is hundreds of miles from its stronghold in north-east Nigeria, the birthplace of a brutal, 11-year insurgency.
The abduction gripped a nation already incensed by widespread insecurity, and evoked memories of Boko Haram’s 2014 kidnapping of more than 270 schoolgirls in the northeastern town of Chibok.
Masari’s announcement came hours after Boko Haram released a video purportedly showing some of the abducted boys.
The footage, which carried Boko Haram’s logo and has not been independently verified, showed dozens of boys clustered under a tree, many appearing dishevelled and exhausted.
A teenager, speaking in English and Hausa, said he was among students taken by a gang belonging to the Boko Haram leader, Abubakar Shekau.
The boy appears to have been coaxed into making demands on behalf of his captors. He calls for the closure of all non-Qur’anic schools and says government troops sent to find the boys should be withdrawn.
The video was released with a recording of a voice resembling that of Shekau, who was behind the 2014 abduction of 276 schoolgirls in Chibok. It reiterated Boko Haram’s claim of responsibility.