Isauro Aguirre, 37, was sentenced to death. Pearl Fernandez, 34, was sentenced to life in prison without the possibility of parole. The two were convicted of the 2013 fatal beating of Fernandez's son, Gabriel.
Judge George G. Lomeli spoke strongly against the pair before the sentences were read, saying their "conduct was horrendous, inhumane and nothing short of evil."
"You want to say that the conduct was animalistic, but that would be wrong because even animals know how to take care of their young, some to the extent that they would sacrifice their own lives in caring for their young," Lomeli said as he stared directly toward Fernandez and Aguirre in the court room.
His emotional statement continued with a touching story of a report he once watched on television news, where a mother cat kept going back into a house fire to save her kittens from the burning building.
"I can only wish...that in the middle of the night you wake up, and you think of the injuries that you subjected on this poor young man, this poor 7-year-old, and that it tortures you," Lomeli said.
MORE: Slain Palmdale boy pepper-sprayed, forced to eat cat feces, brother testifies
The judge allowed family and friends to read victim-impact statements before the two were sentenced. Many spoke with a stern tone as they shared their relief.
"After five long, heartbreaking years of sitting and listening and seeing every gruesome thing you both did to Gabriel, it's finally over for the both of you," said Olivia Rubio, the young victim's cousin.
Gabriel was routinely beaten, shot with a BB gun, fed cat feces and forced to sleep while gagged and bound inside a small cabinet, witnesses and prosecutors said. He died in May 2013.
Last December, a jury recommended Aguirre be sentenced to death after convicting him of first-degree murder and the special circumstance allegation of murder involving torture.
Fernandez pleaded guilty to first-degree murder in February. She admitted to the torture special circumstance allegation in exchange for a life prison term without the possibility of parole. She had been facing a possible death sentence if the case against her had gone to trial and if she had been convicted as charged.
At her sentencing hearing, Fernandez read an apology letter out loud, saying she hopes one day her children can forgive her.
"I want to say I'm sorry for what happened. I wish Gabriel was alive. Every day I wish that I'd made better choices. I'm sorry to my children, and I want them to know that I love them," she said.
MORE: Slain Palmdale boy had BB lodged in groin, skin missing from his neck, nurse testifies
Deputy District Attorney Jon Hatami, a prosecutor who was also a victim of child abuse, expressed his gratitude on the outcome of the case -- one that he holds close to his heart.
"Prosecutors are human, too. We're people," he said as he held back tears. "I'm also a dad. I'm just doing my job, that's it."
City News Service contributed to this report.