A Massachusetts judge sentenced a teenager convicted of raping and murdering his high school math teacher to serve at least 40 years in prison, and the victim's father called the killer "pure evil."

Philip Chism, 17, was convicted in December of killing Colleen Ritzer, a 24-year-old math teacher at his suburban Boston high school. The sentence of life in prison, with the possibility of release after 40 years, was less than the 50 years prosecutors had asked Essex County Superior Court Judge David Lowy to impose.

"When something terrible happens, people will often say, 'It could always be worse,'" Lowy said. "It is difficult for this court to imagine what could be worse for an individual and family to endure than the brutal murder of Colleen Ritzer."

RELATED: Family of teacher killed by student in 2013 asks for life sentence

Chism was a 14-year-old freshman who had just moved from Tennessee when he killed Ritzer, cutting her throat with a box cutter and using a recycling bin to dump her body.

"I will never forgive him. He is evil, pure evil," father Tom Ritzer said. He was one of nine friends and family members of the victim who spoke at the sentencing.

Chism's attorneys had asked the judge to make him eligible for parole when he turned 40.

"Witnesses ... testified that he was nice, respectful, kind," said public defender Susan Oker. "So what happened? We stand here today not understanding."

Chism's mother expressed sympathy for the Ritzer family.

"Words can't express the amount of pain and sorrow these past two and a half years have been," Diana Chism said. "There is no one who has suffered more than the Ritzer family." 

Hours after murdering Ritzer, who had stayed late to help students, Chism was found wandering along a state highway carrying a bag containing Ritzer's identification and the box cutter.

During the trial, defense attorneys did not deny that Chism had attacked Ritzer but contended he was not criminally responsible for his actions due to a long-undiagnosed severe mental illness that was aggravated by the move.

The trial was occasionally delayed by Chism, who was once observed beating his head on a floor, and at another point, refused to return to the courtroom, telling his lawyer he was "about to explode."