DAKAR, Senegal — The students had come to study the Koran. Instead, officials said, they faced beatings, shackles, and dormitories that looked more like jail cells.
Police in Nigeria have freed about 1,000 children and adults from four Islamic schools over the past month, calling conditions in the loosely regulated institutions inhumane.
The crackdown has increased pressure on President Muhammadu Buhari to tighten oversight on traditional private schools known as Almajiris, which teach millions of children in the country’s predominantly Muslim north.
Authorities released 147 students Saturday from one facility in Kaduna state. The pupils, who wore maroon uniforms, were taken to a camp where police assessed their condition and contacted relatives.
‘‘No responsible democratic government would tolerate the existence of the torture chambers and physical abuses of inmates in the name of rehabilitation of the victims,’’ Garba Shehu, Buhari’s spokesman, said in a statement Saturday.
Although Buhari’s office applauded Nigerian police for carrying out the raids, officials stopped short of announcing policy changes to more closely regulate the facilities.
An estimated 10 million children attend Islamic schools in Nigeria, which for centuries were a path to becoming a religious scholar. Teachers are supposed to promote discipline, peace, and humility, and part of the education can involve begging for money on the street.
Some parents pay tuition for their children to memorize the Koran. Others hope religious leaders can help youths facing drug addiction and mental illness in areas that lack formal health care.
But the crackdown has revealed what appears to be an exploitation of the system.
‘‘The more people who rely on them, the more brutal they become,’’ said Isa Sanusi, spokesman for Amnesty International in the Nigerian capital, Abuja.
Three days before the Kaduna raid, authorities rescued 500 people from an Islamic school in Katsina state, which billed itself as a rehabilitation program for young people with behavioral issues.
The men and boys who were rescued had been chained to walls, struck with canes, and often went hungry in packed rooms, officials said. Some reported enduring sexual abuse.
They had been ‘‘subjected to all forms of dehumanization,’’ police spokesman Sanusi Buba told Voice of America.
On Oct. 12, police freed 67 men and boys from a similar facility in the same northwestern state. Photos showed shirtless victims sitting on the ground, some with chains around their necks.
‘‘They were just beating, abusing, and punishing us every day [in] the name of teaching us,’’ Lawal Ahmad, 33, told Reuters at the time. ‘‘They are not teaching us for the sake of God.’’
And on Sept. 27, authorities discovered 500 men and boys living in what Kaduna Police Chief Ali Janga described to the BBC as a ‘‘house of torture,’’ triggering a wave of scrutiny of such institutions across the region.
Children as young as 5 were kept in chains, officials said. Police released a photo of a boy with scars down his back and arms.
Leaders of the schools raided by police did not immediately respond to request for comment.
Ibrahim Garba Buzu, who runs an Islamic school in the northeastern city of Maiduguri, has read about the raids with dismay.
‘‘Such people should be prosecuted,’’ he said, ‘‘and not be seen as representing the Islamic schools.’’
Enrollment in religious education has climbed as parents, who often cannot afford primary school fees, seek alternatives that look honorable on the surface, said Matthew Page, associate fellow at Chatham House’s Africa Program in London.
It’s hard to know how widespread the problem is, he said, because data is scarce and oversight is flimsy.
‘‘There is this absence of the state,’’ he said, ‘‘when it comes to regulating entities like these schools effectively.’’
Over the years, some Nigerians have pushed back against the popular schools, asserting they don’t prepare children for the modern economy, said John Campbell, a former US ambassador to Nigeria.
‘‘But they nevertheless provide some measure of food and education,’’ he said, ‘‘to over 10 million students who otherwise would have little access to either.’’