Nigerian police say they have rescued nearly 500 people from a building in the northern city of Kaduna where they were detained and allegedly tortured.
Those held were all men and boys - some were found chained up.
Kaduna state's police chief Ali Janga told the BBC the large house was raided following a tip-off about suspicious activity.
He said it was a "house of torture" and described it as a case involving human slavery.
The detainees, not all Nigerian, said they had been tortured, sexually abused, starved and prevented from leaving - in some cases for several years.
It is not clear how they got there. Some of the children told the police that their relatives had taken them there believing the building to be a Koranic school.
But the police say there is no concrete evidence to suggest that the building was ever a school.
Eight suspects have been arrested.
The police chief said the detainees - some with injuries and starved of food - were overjoyed to be freed.
They were taken to a stadium in Kaduna overnight to be cared for while arrangements are made to find their families.
Nigerian authorities say the nearly 500 freed captives will be given medical and psychological examinations.