More than 300 captives, most of them children and many in chains, have been rescued from a building in the northern Nigerian city of Kaduna, a police spokesman said on Friday.
All the children seen by a Reuters reporter at the scene were boys aged from around five to their late teens. Some had their ankles manacled together and others were chained by their legs to large metal hubcaps.
Police said the building housed an Islamic school and that seven people had been arrested in the raid on Thursday. It was not clear how long the children had been held there.
"The state government is currently providing food to the children who are between the ages of five and above," said Yakubu Sabo, the Kaduna police spokesman.
"We have identified two of the children to have come from Burkina Faso, while most of them were brought by their parents from across mostly northern Nigerian states," he added.
He said those arrested were teachers at the school.
Reports carried by local media said the captives had been tortured, starved and sexually abused. Reuters was not immediately able to confirm those reports, though sores that appeared consistent with injuries inflicted by a whip were visible on one boy's back.
Islamic schools, known as Almajiris, are common across the mostly Muslim north of Nigeria - a country that is roughly evenly split between followers of Christianity and Islam.
Parents in northern Nigeria, the poorest part of a country in which most people live on less than $2 a day, often opt to leave their children to board at the schools.
The children have been moved to a temporary camp at a stadium in Kaduna, and would later be moved to another camp in a suburb of the city while attempts are made to find their parents, police said.
Some parents who had already been contacted went to the school to retrieve their children.
"We do not know that they will be put to this kind of harsh condition," one parent told Reuters.
Islamic schools in Nigeria have for years been dogged by allegations of abuse and accusations that some children have been forced to beg on the streets of northern Nigerian cities.
Earlier this year, the government of President Muhammadu Buhari, himself a Muslim, said it planned to eventually ban the schools, but would not do so immediately. It followed a number of reports in the Nigerian media that the government planned to outlaw such schools.