Police in Nigeria have rescued more than 300 male students — mostly children — who were beaten, sexually assaulted and starved in an Islamic school that was turned into a house of horrors, according to reports.

“The condition under which we found the victims was so dehumanizing, many of them were chained,” said police spokesman Yakubu Sabo in the northern city of Kaduna.

Officers raided the building in the Rigasa area of the city on Thursday following a tip and found the victims, who were kept in “the most debasing and inhuman conditions in the name of teaching them the Koran and reforming them,” Sabo said.

The building’s owner told authorities that students had been brought by their families to learn the Quran or because they had problems such as drug addiction.

But officials said the place was not licensed to run any reformatory or educational program.

Six teachers and the owner were detained and questioned by police after the group of men and boys — some as young as 13 – were released, according to CNN.

Some of the victims were found padlocked to car hubcaps and had their hands and feet chained.

“They had scars and some marks of torture and violence on them. They were pleading they should be taken out of the place and they have been evacuated from that facility,” Sabo told the network.

“The victims were abused. Some of them said they were sodomized by their teachers,” he said, adding that police found a “torture chamber” inside the school.

Local police chief Ali Janga said that despite its claims to be an educational facility, the conditions proved that it was “neither a rehab (center) or an Islamic school,” according to AFP.

One of the victims quoted by local media described the horrendous conditions and treatment at the facility.

“I have spent three months here with chains on my legs,” said Bello Hamza, 42.

Another victim, Hassan Yusuf, told AFP that he had been sent to the school two years ago because he had converted to Christianity.

“They keep you incommunicado, you can’t talk to anybody,” the married father said.

Authorities said that some of the victims had been brought from various countries in the region including Burkina Faso, Mali and Ghana.

Parents of some of the victims were “shocked and horrified” when they saw the conditions of their children, Sabo said.

The parents were allowed to visit their children at the center every three months, but only in specific areas of the facility.

“They were not allowed into the house to see what was happening… the children are only brought to them outside to meet them,” Sabo said.

“All they thought was their children are being taught the Quran and good manners as they looked subdued,” he added.

With Post wires