A Texas judge on Monday tore into a man who was convicted of beating a 4-year-old girl to death, telling him: “You should die in a locked closet.”

Charles Wayne Phifer, 36, was sentenced to life in prison after pleading guilty to murdering his girlfriend’s daughter Leiliana Wright in March 2016.

Jeri Quezada, 33, Phifer’s former girlfriend and Wright’s mother, testified that Phifer bound Wright’s hands behind her back and strung her up in a closet.

"What you did was monstrous and savage," Dallas County Judge Robert Burns told Phifer.

Burns said in his nearly 30-year career of handling "hundreds of murder cases" it was the worst he had ever seen, FOX 4 reported.

Dallas County jurors were shown pictures of Wright’s battered body, covered from head to toe in bruises.

During Phifer’s trial, Quezada admitted she would sometimes hit her daughter. She said she would strike the girl’s legs with a switch made from bamboo. Prosecutors argued that Quezada and Phifer were both responsible for the girl’s death, but Phifer had been alone with the girl for hours on the day of her murder.

Wright’s death implicated the failure of Child Protective Services. Records cited by The Associated Press indicated the agency failed to investigate allegations by the child’s grandmother who had reported abuse as early as February 2015.

CPS reportedly started looking into the girl’s wellbeing in the months before her death. But records show a caseworker failed to check on her for more than a month and when a child abuse investigator did check on her, he left in the care of Quezada despite the girl’s black eye.

Quezada pleaded guilty last year to felony injury to a child for her role in her daughter's death. She was sentenced Wednesday to 50 years in prison.