LOS ANGELES — A California man was sentenced to death on Thursday for the killing of a young boy who prosecutors said was tortured because he believed the child was gay, and the boy's mother was sentenced to life in prison.

Los Angeles County state court Judge George Lomeli sentenced 37-year-old Isauro Aguirre after he was convicted late last year of first-degree murder in the death of 8-year-old Gabriel Fernandez.

The child’s mother, Pearl Sinthia Fernandez, 34, pleaded guilty to first-degree murder in February and was sentenced on Thursday to life in prison without the possibility of parole. Aguirre was Fernandez’ boyfriend.

Gabriel died in May of 2013 in the working class high desert community of Palmdale, north of Los Angeles. Prosecutors said the boy's skull was fractured, 12 of his ribs were broken, he was forced to eat cat feces, and that he slept, bound and gagged, in a cabinet.

"The conduct was horrendous, inhumane and nothing short of evil," Lomeli said Thursday in imposing sentence.

Gabriel Fernandez, who was routinely beaten, starved, forced to sleep in a closet and tortured until his 2013 death. NBC News

"It is unimaginable, the pain that this child probably endured. And from what I heard, Gabriel was a kind, loving individual who just wanted to be loved,” the judge added.

Los Angeles County Deputy District Attorney Jon Hatami said during the trial that Aguirre "liked torture" and systematically abused Gabriel Fernandez because he thought the boy was gay.

"This case showed how evil can not only inflict lasting damage to those who loved Gabriel but our society as well," Los Angeles County District Attorney Jackie Lacey said in a statement Thursday.

Under the terms of the Fernandez’ plea deal, a sentence of life in prison without parole was expected. In November Aguirre was convicted by a jury, which found that a special circumstance allegation of intentional murder by torture was valid, prosecutors said.

Fernandez said in a statement Thursday that "I want to say I'm sorry to my family for what I did. I wish Gabriel was alive," and "every day I wish that I made better choices," according to NBC Los Angeles.

State executions in California have been held up by court challenges since 2006. More than 740 inmates are currently on the state's death row, according to the California Department of Corrections.

Lacey said that the sentences handed down on Thursday mean “the defendants will now spend the rest of their lives in prison for their reprehensible actions."

Several agencies investigated abuse allegations leading up to Gabriel's death, the Associated Press reported. On several occasions, investigators concluded there was no evidence of abuse.

Prosecutors have since filed charges of child abuse and falsifying records against four county social workers in Gabriel's death.