A judge in Massachusetts on Friday sentenced a teenager to serve at least 40 years in prison for killing, raping and robbing his high school math teacher.

Philip Chism,17, stood in handcuffs, his face expressionless, as sentences by Superior Court Judge David Lowy were read aloud, following emotional victim impact statements from family and friends of the slain teacher, Colleen Ritzer.

“He is pure evil, and evil can never be rehabilitated,” said Peggie Ritzer, Colleen’s mother, furious because Chism would eventually be eligible for parole. “We will never get a second chance and neither should he.”

Chism did get a life sentence on the murder charge but could have gotten parole after 25 years because of recent court rulings that limit sentences for juvenile murder defendants.

However, he effectively will have to serve at least 40 years because the judge gave him concurrent 40-year sentences on charges of rape and robbery.

Chism was 14 when Ritzer was killed and he was arrested. He’ll be 54 when he’s first eligible for parole.

‘I lost my beautiful little girl’

Chism killed Ritzer, 24, with a box cutter in a bathroom at Danvers High School on the afternoon of October 22, 2013, after classes had ended for the day. Ritzer’s body was found later in woods near the school.

A jury in December found him guilty of first-degree murder, aggravated rape and armed robbery.

On Friday, Ritzer’s family told the judge how her death devastated their lives.

“I will never get to walk Colleen down the aisle at her wedding,” said Colleen’s father, Tom Ritzer. “I will never giver her away at the altar, or have that father-daughter dance … And I lost my beautiful little girl.”

Many family supporters wore pink, prompting Peggie Ritzer to say that “the sea of pink brings us great comfort, but also brings great pain because she is not here.”

Brother Daniel Ritzer said, “She was the greatest sister a kid could ask for.

“I wake up in the morning sad,” he said. “You do not know pain until you are forced to watch someone you love be lowered into the ground.”

Lawyers had presented insanity defense

During the trial, Chism’s defense attorney argued that Chism has suffered from a psychotic disorder since a young age and that he responded to voices and hallucinations at the time of Ritzer’s killing.

The defense conceded that Chism killed Ritzer but presented an insanity defense. The court had earlier found Chism competent to stand trial.

Prosecutor Kate MacDougall argued that Chism did not suffer from mental illness. Surveillance video from inside the school — including that which showed Chism following Ritzer to the bathroom where she was killed — was part of the prosecution case.

After the sentencing, Essex County DA Jonathan Blodgett complained about a Massachusetts Supreme Court ruling that eliminated life-without-parole sentences for juveniles convicted of first-degree murder.

“This family who has suffered beyond measure, cannot close the book on this case,” he said as Peggie and Tom Ritzer stood nearby. “They cannot move forward with the knowledge that the person who took their precious daughter’s life is not forever gone from their lives. Instead, they move forward knowing that in some point in time, they will sit at a parole board hearing perhaps multiple times in return of the most horrific and devastating event of their lives.”

In 2012, the U.S. Supreme Court ruled that mandatory sentences of life without parole for juvenile homicide offenders violated the Constitution. Seven years earlier, the court ruled that death penalties cannot be imposed for crimes committed while under 18.

Chism faces attempted murder charge

Chism will be held in the juvenile system until he’s 18. Then he’ll be transferred to the adult system.

He will face a judge at least one more time.

Chism will be tried on attempted murder charges stemming from a 2014 attack on a female youth services clinician in a youth holding facility where he was awaiting trial.