More than 300 boys and young men have been rescued after they were chained, beaten, starved and sexually assaulted in a building in northern Nigeria.
The youngest victims were about five-years-old, and the oldest were in their late teens.
Some had their ankles manacled together, while others were chained by their legs.
Several victims had visible marks on their bodies that showed they had been tortured, police in the city of Kaduna said.
On one boy's back, sores consistent with whip injuries were visible.
Footage showed most of the victims in bad condition, and some were walking with difficulty.
The building housed an Islamic school and seven people, including six believed to be teachers, were arrested in the raid which followed a tip-off to authorities.
It is not known how long the children had been there.
The building's owner, who was also among those detained, told officers the children had been brought there by their families to learn the Koran or because they had problems including drug addiction.
But police said the site did not have a licence to run any reform or educational programmes.
The children have been moved to a temporary camp at a stadium in Kaduna, and were set to be taken to another camp in the city while attempts were made to find their parents.
Some parents who have already been contacted have gone to the school to collect their children.
Police spokesman Yakubu Sabo said: "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.
"The condition under which we found the victims was so dehumanising, many of them were chained."
For years, Islamic schools in Nigeria, known as Almajiris, have faced allegations of abuse.
There have been claims that some children have been forced to beg on the streets.
Islamic schools are common across the mostly Muslim north of Nigeria - a country almost evenly split between followers of Christianity and Islam.
Parents in northern Nigeria often choose to leave their children to board at the schools.
Earlier this year, the government of President Muhammadu Buhari, who is a Muslim, said it planned to ban the schools at some point in the future.