New York’s notoriously corrupt and violent Rikers Island jail complex got that way after city officials let the correction officers’ union run the complex as it saw fit. The result was a system in which guards could beat up inmates for minor offenses, like talking back, without fear of being held accountable.

One might think that young officers became hardened in a workplace where sadistic behavior was the norm. But a report released this week by New York City’s Department of Investigation lays bare another horrendous problem: The jails fell into the habit of hiring guards who had criminal histories or were otherwise unfit for the job.

The Department of Investigation reviewed the applications of 153 people hired by the Correction Department in 2014. The investigators found that more than one-third had records that should have either disqualified them or prompted closer scrutiny of their backgrounds. Ten had been arrested more than once, and 12 had previously been rejected by the New York Police Department, six of them for “psychological reasons.”

Additionally, 79 had relatives or friends who were current or former inmates, which investigators viewed as a potential corruption threat. According to the report, the Department of Correction has only recently developed a legitimate process for screening out applicants who have had a “gang affiliation” — which generally means the person has had a close relationship with gang members or has in some way participated in their activities. This poses an enormous problem, the report noted, because gang members generally place gang allegiance ahead of their duties as officers.