A teenager accused of brutally raping and killing his math teacher at school allegedly told police he "became the teacher" after she set him off with a "trigger" word.

Philip Chism is headed to trial as an adult in Massachusetts on Wednesday. In 2013, he was charged for the murder, rape and robbery of his algebra teacher, 24-year-old Colleen Ritzer, who was found with her throat slit by a box cutter in the woods near their Danvers school.

She was sexually assaulted twice, once with a stick, and a note was found nearby that read “I hate you all,” the Associated Press reported.

On October 22, 2013, Ritzer asked Chism, then 14 and in ninth grade, to stay after class when she noticed he was drawing in a notebook instead of taking notes, student Rania Rhaddaoui reportedly said at the time.

Read: Woman Arrested After Her Boyfriend's Body is Found in a Freezer in Their Living Room

Another student who overheard Ritzer and Chism speaking that day told police that when Ritzer mentioned Tennessee, where Chism previously lived, the boy became “visibly upset” and began talking to himself, according court documents.

School surveillance footage reportedly shows Chism following Ritzer into a school bathroom wearing a hood and gloves. The boy— described as quiet and a standout athlete on the soccer field— walked out of the bathroom alone 12 minutes later, AP reported.

Chism was then seen in the video pulling a recycling barrel through the school and outside; the bin was later found near Ritzer’s body, according to search warrant documents filed in court.

Ritzer, who described herself on social media as a "Math teacher often too excited about the topics I'm teaching," was found partially covered by leaves in a wooded area near the school.

The teen was found hours later walking along a highway and carrying a bloody box cutter, the teacher’s ID, credit cards and a pair of women’s underwear inside his backpack, the AP reported.

When asked whose blood was on the box cutter, Chism reportedly said: “It’s the girl’s.”

Story continues

In a videotaped interview with police, Chism said Ritzer provoked the attack with a "trigger" word, which he would not reveal, the AP reported.

Read: Teen Confesses to Stabbing His Pregnant Mom More than 20 Times, Police Say

"After she insulted me, that's when I became the teacher," Chism said, according to a description Judge David Lowy gave in his written ruling that held prosecutors will not be allowed to tell the jury about the confession he allegedly gave to Danvers police. Lowy ruled that Chism did not fully understand his constitutional rights before he spoke to police.

The teen’s lawyers plan to use a mental health defense, as his mother told cops that her son had been under stress from her divorce from his father and their move from Clarksville, Tennessee, to Danvers, according to reports. Though insanity defenses rarely work in Massachusetts, Chism’s age might work to his benefit, legal experts told the AP.

"I assume the defense will tie it into research on adolescent brain development, in particular, adolescents have a difficult time calculating the future and having a sense of the ramifications on their future lives,” Daniel Medwed, a law professor at Northeastern University, said to the AP.

Watch Below: Wife Testifies for Murdering Husband: He Raped Me 30 Times

Related Articles: