(CNN) -- Pakistani police rescued 54 men and 14 young boys Monday from an Islamic religious school and drug rehabilitation facility where they were found chained to one another and held in an underground room, police officials told CNN.
Video from the madrassa showed young men and boys -- some appearing to be as young as 8 years old -- with heavy chains connected to their ankles.
According to CNN affiliate GEO news, the Islamic school, Al-Arabiya Aloom Jamia Masjid Zikirya, is located in Sohrab Goth -- a suburb of Gadap in Karachi.
Three people have been detained, and police are looking for the cleric who ran the facility, a spokesman for the Home Ministry in Sindh Province, Sharfuddin Memon, told CNN.
Memon said the facility was part madrassa and part drug rehab facility, and the captives were chained at night apparently to prevent their escape.
The religious school, which unlike thousands of others is registered with the government, was raided overnight, he said.
"It's alarming what was found in there. Some of these kids were treated worse than animals," Memon said.
Pakistani media tipped off authorities about the condition of those living there, he said.
Many of the captives told police they were sent there by their families because they were recovering drug addicts. During the day, they worked and did religious studies, Memon said.
There were signs that some of them were beaten, he said. Some told Pakistani TV they were electrocuted, a claim police are investigating.
"Obviously there are good madrassas giving good education to good human beings, but there are others that are doing ugly things. We have to find out how this happened and take this issue very seriously," Memon said.
There is no evidence that the facility was being used to train militants, he added.
Speaking to GEO news, Gadap police official Rao Anwar said the majority of the children were from the Khyber Pakhtunkhwa region of Northwest Pakistan.
Two Karachi police officials identified one of the arrested employees as Qari Mohammad Usman, the madrassa caretaker. A gun was found in his possession, in addition to many keys for the padlocks used to chain the men and boys, the officials said.
Journalist Shaan Kahn contributed to this report.