Jurors in the trial of a Massachusetts teenager accused of killing his high school math teacher were shown surveillance footage of the teen following the teacher into the school bathroom just mere moments before her death.

The video shows then-14-year-old Philip Chism, with the hood of his jacket partially covering his face, following Colleen Ritzer as she walked alone in the hallway and into the a bathroom of Danvers High School on October 22, 2013.

The now 16-year-old is accused of killing Ritzer, 24, with a box cutter in a girls’ bathroom at the school. Chism pleaded not guilty to aggravated rape, robbery and murder charges in January. He is now being tried as an adult.

Ritzer, whose body was found a day after the murder in a recycle bin in the woods, was found with a slashed throat and to have been raped with an object, authorities said. A handwritten note was found next to her body, reading “I hate you all,” according to court documents.

Chism’s attorney argued his client was going through a psychotic episode, but he was found earlier this month competent to stand trial.

“He was severely mentally ill,” Chism’s attorney, Denise Regan, explained Monday. “He had been suffering from a psychiatric disorder since the age of 10.”

(h/t Fox4KC)

Follow Trent Baker on Twitter @MagnifiTrent