Philip D. Chism was prepared to kill.
According to investigators, the 14-year-old freshman allegedly came to Danvers High School on Oct. 22 with a knife, a box cutter, changes of clothes, gloves, and a ski mask.
He had been asked to stay late to prepare for an upcoming test by his math teacher Colleen Ritzer, who made her way to the bathroom just after school ended, around 2:54 p.m, according to a police description of school security footage.
But just a moment later, according to police, a hooded Chism appears on the tape. Donning gloves, he follows Ritzer into the restroom before emerging 12 minutes later — alone.
Authorities on Friday unsealed a search warrant affidavit containing new, chilling allegations.
Prosecutors say Chism slashed Ritzer’s throat; partially stripped her of her clothing; and robbed her of her phone, credit cards, and two driver’s licenses. Her body had been carted in a recycling bin to a wooded area behind the school. Investigators said she had been sexually assaulted with an unidentified object.
Chism allegedly left a folded handwritten note just a few feet away from Ritzer’s body that read: “I hate you all.”
The teen was indicted Thursday by an Essex County grand jury on a charge of first-degree murder as an adult, and was indicted as a youthful offender on charges of aggravated rape and armed robbery. He is due to be arraigned in Essex Superior Court on the murder charge Dec. 4, and is being held without bail at a Department of Youth Services facility.
Prosecutors have said nothing about what Chism’s motive may have been, but the documents unsealed Friday say the teen had recently moved to the town from Tennessee as part of his parents’ “stressful divorce.” A fellow student told police, according to the documents, that Chism had become visibly upset during class when Ritzer mentioned Tennessee. Later, the student told police, she saw Chism talking to himself.
Chism’s defense attorney and the Ritzer family, through a spokesman, declined to comment Friday about the newly released details.
A search warrant affidavit filed by State Police Trooper Robert C. LaBarge Jr. contained an account of the search for the missing teen and teacher as well as a detailed timeline of their movements, drawn from surveillance cameras in the school building.
“Because Philip Chism came to school armed with a boxcutter, a balaclava/ski mask, gloves, and multiple changes of clothing, I have reason to believe he planned the crime,” LaBarge wrote.
The video, according to the search warrant affidavit, shows Chism following Ritzer into the high school’s second-floor women’s bathroom.
About 10 minutes later, video shows another student, whose name is redacted from the court documents, entering the bathroom and quickly walking back out and down the hallway.
The student later told police she saw a person’s “butt’’ and assumed somebody was changing clothes, prompting her to leave. The person was standing, she told police, and appeared to be leaning over.
Moments after the student left the bathroom, Chism followed, with the hood still over his head, walking and running through the school, until he found a green recycling bin, which he dragged back to the bathroom.
Then, wearing a mask, Chism dragged the recycling bin out of the building, depositing it behind the school around 3:30 p.m.
It would be 12 hours before police would locate Ritzer’s body, covered with leaves and debris “in a manner consistent with attempts to hide the body from being seen.” The recycling bin that Chism allegedly used to transport the body out of the school lay discarded about 20 feet away.
Police first became involved in the case when a distraught Diana Chism phoned Danvers police at 6:34 p.m. to report that her son had never returned home from school. Police activated a search for the teen as his mother went to the police station to fill out a missing person report.
With the assistance of the phone company, police tracked the teen’s cellphone to a nearby Hollywood Hits movie theater, where Chism attended an afternoon screening of Woody Allen’s “Blue Jasmine.”
By the time they had arrived at the theater, Chism was gone.
Danvers High principal Sue Ambrozavitch sent a mass e-mail around 9 p.m. to all school faculty and staff informing them that Chism was missing, according to the account provided in the affidavit. Moments later, Ambrozavitch — who did not respond to requests for comment — got a phone call from one of the school’s math teachers, informing her that Ritzer was also missing.
Ritzer was officially reported missing to Danvers police at about 11:20 p.m. by her parents, who were concerned when she never returned home and was not answering her cellphone. Ambrozavitch joined police as they began a search of the school grounds.
They first noticed that Ritzer’s car was still in the school parking lot, according to the investigative documents. When they got to her classroom, they noted that her personal belongings were missing.
As the search continued into the early hours of Oct. 23, Chism was picked up by a police officer in nearby Topsfield who was responding to a call about an unidentified person walking along Route 1. The officer recognized the person walking down the road as the missing Danvers teen.
The officer patted him down on the scene, discovering a knife, and after he was taken to the police station a further search of his backpack found a bloody box cutter, as well as credit cards and two drivers’ licenses belonging to Ritzer, and a woman’s underwear.
Asked about the credit cards, Chism initially said he found them at a local Stop and Shop, but later he said he stole them from Ritzer’s car. When officers asked him where the blood came from, Chism allegedly responded: “The girl.”John R. Ellement of the Globe staff contributed to this report. Wesley Lowery can be reached at Wesley.Lowery@globe.com. Follow him on Twitter @WesleyLowery.