Ryan Grantham, who appeared in an episode of the popular TV show "Riverdale," was sentenced to life in prison for murdering his mother.

Ryan Grantham pled guilty to second-degree murder in the death of his mother, which carries an automatic life sentence.

Grantham will not be eligible for parole for 14 years, according to B.C. Supreme Court Justice Kathleen Ker, who called the case "tragic" and "heartbreaking."

Barbara Waite, Grantham's mother, was shot in the back of the head while playing the piano in their townhouse in March 2020.

Prosecutors claim Grantham confessed to the murder and showed the body inside the house in a video shot with a GoPro camera.

The next day, Grantham draped a sheet over the body and lit candles around it before fleeing in a car loaded with guns, ammunition, and Molotov cocktails.

According to prosecutors, Grantham made it to Hope before turning around and contemplating a mass shooting at Simon Fraser University, where he was enrolled.

Grantham is said to have told an expert that he wanted to kill his mother so she wouldn't witness the violence he was planning.

On the final day of his sentencing hearing, Grantham addressed the court, saying, "I cannot explain or justify my actions.