California 2nd District Court of Appeals has thrown out a case accusing four employees of the Los Angeles County Department of Children and Family Services (DCFS) of criminally mishandling the case of Gabriel Fernandez, an 8-year-old child whose parents subjected him to gruesome, ongoing and ultimately lethal torture because they thought he might be gay.

Though Fernandez died in May 2013, Los Angeles’ District Attorney Jackie Lacey brought charges against DCFS employees Kevin Bom, Stefanie Rodriguez, Gregory Merritt, and Patricia Clement in 2016, charging them with a felony count of child abuse and a felony count of falsifying public records.

Related: Parents torture & kill 10-year-old after he says he ‘likes boys’

An internal investigation at the DCFS found that reports of abuse and evidence that Gabriel, like his long absences from school, were ignored. In addition to the four DCFS employees who were charged, two DCFS employees and their supervisors were fired.

In a 2-1 decision, the court’s justices ruled that the charges against the DCFS employees were based on “alleged nonfeasance” and that prosecutors couldn’t prove that the employees had the “duty or ability” to control the child’s abusers or gain custody of the child.

Stefanie Rodriguez’s attorney, Lance Michael Filer, told The Los Angeles Times, “Neither [Rodriguez] nor anyone else in her shoes should have been held criminally accountable for the unpredictable nature of criminals and that the people that actually harmed Gabriel have already had their trial and day in court.”

It’s unclear if prosecutors will appeal the court’s decision.

Before he died, Fernandez was beaten daily with a rotating array of implements including a baseball bat, a wooden club, and computer cords. He was also pepper-sprayed, shot with a BB gun in the face and groin, repeatedly choked until losing consciousness, forced to eat cat feces and his own vomit, and bound, gagged and forced into a cupboard for hours at a time without food, water, or the ability to go to the bathroom.

The boy was found unconscious in May 2013 with BBs embedded in his lungs and genitals, a cracked skull, three broken ribs, missing front teeth, and patches of skin that were missing, burned, or bruised. He died days after being hospitalized.

His mother, Pearl Sinthia Fernandez, and her boyfriend, Isauro Aguirre, were found guilty of first-degree murder. She was sentenced to life in prison without parole and the boyfriend was sentenced to death.

In August 2018 the California legislature approved a request to the California State Auditor to investigate whether DCFS has “adequate practices to identify and protect LGBTQ youth.”