“If you are praying they will beat you. If you are studying they will beat you,” Isa Ibrahim, 29, said.
The police said it was a place of human slavery, with many detainees found in chains.
Some of the victims had been tortured and sexually abused, the authorities say.
Ishaq Khalid, who visited the school in northern Nigeria, says there are concerns that similar abuse may be occurring in other such institutions.
Many families in this mainly Muslim part of the country can’t afford to send their children to school and those that can often enrol them in poorly regulated Koranic schools like this one, he says.
Seven people, including some teachers, have been arrested. The government says it will investigate other schools.
Isa Ibrahim’s ordeal
Mr Ibrahim said he was sent there two weeks ago by his family, apparently to “correct his behaviour”.
He said he had tried to escape the day before the police arrived.
“I have many injuries. Almost all parts of my body have injuries,” he said. “Even if you are sleeping – they’ll use [a] cane to wake you up.”
He said he had been starved and was only given plain rice to eat. People kept at the centre “lose all of our energy”, he added.
Abandoned chains at a ‘house of torture’
The Daru Imam Ahmad Bun Hambal facility was supposed to be an Islamic school, as well as a correctional home for children and young people with behavioural problems. But there were clearly far darker things going on behind its walls.
The facility has been shut and taken over by police. The pink two-storey building is a prison-like structure surrounded by high walls and barbed wire. It has an imposing gate, with more than a dozen rooms, with small windows for ventilation.
When I visited, the compound was littered with abandoned household items like mattresses, buckets, clothes and books – apparently left in the wake of the police raid.
Kaduna state police spokesperson Yakubu Sabo told me most of the captives had been rescued with their shackles still on but I could still see some abandoned chains, as well as car wheels and petrol-powered generators to which the victims had allegedly been attached.
People living nearby have been left bewildered – some told me they couldn’t believe the shocking discovery.
The “students” did not go to out to beg on the streets as is the usual practice with traditional Koranic schools in this region. Nor had they been forced to do hard labour – some said they had not seen the outside world for years.
Relatives are being reunited with their children at a camp in Kaduna where the victims were taken after being rescued.
Some said they had been prevented from seeing their children at the school.
“If we had known that this thing was happening in the school, we wouldn’t have sent our children. We sent them to be people but they ended up being maltreated,” said a parent named Ibrahim, who had identified his son.
The Kaduna state government says it will now carry out checks on all Koranic schools across the state.
“This is an eye-opener for us,” said Hafsat Baba, Kaduna State Commissioner of Human Services and Social Development. She added that if this scale of abuse was happening in the main city, she didn’t know what might be going on in rural areas.
“We have to map all the schools. And we have to make sure that if they violate the government orders then they have to be closed down completely,” she told the BBC.
“If we find any facility that is torturing children or is harbouring these kind of horrific situations that we have just seen, they are going to be prosecuted.”
President Muhammadu Buhari has condemned reports of shocking abuse at the institution.
He also urged religious and traditional leaders to work with the authorities to “expose and stop all types of abuse that are widely known but ignored for many years by our communities”.