(CNN) — Philip Chism, the Massachusetts teenager accused of raping and killing his algebra teacher, became visibly upset when the teacher, Colleen Ritzer, spoke about the teen's home state of Tennessee after class, according to a police affidavit unsealed Friday.
A ninth grade student told investigators that she was in class with Chism and Ritzer after school on the day of the crime, the affidavit said. She said the teacher and Chism were talking about China but, at some point, Ritzer mentioned the student's home state of Tennessee.
Chism became "visibly upset," the student said. When Ritzer noticed that Chism was upset, she changed the subject, said the unidentified student, who described Chism as "talking to himself."
The affidavit, in chilling detail, offers the first hint of a possible motive in last month's gruesome killing of the popular high school teacher. Ritzer, 24, was allegedly raped with an object and had her throat slashed. A handwritten note found next to her body said, "I hate you all."
A Massachusetts grand jury on Thursday indicted Chism, 14, on charges of murder, aggravated rape and armed robbery in connection with Ritzer's slaying on October 22, according to the Essex district attorney. Citing Massachusetts law, prosecutors said they would ask that Chism be tried in an adult court.
"The indictments ... detail horrific and unspeakable acts," District Attorney Jonathan Blodgett said in a statement.
Denise Regan, Chism's public defender, declined to comment.
The affidavit includes testimony from eyewitnesses as well as a school video surveillance timeline showing Chism and Ritzer in the same area of the school during the teacher's final moments.
In the video, Ritzer appears to enter a second-floor girls restroom -- apparently a faculty restroom was occupied -- and Chism, wearing gloves and red sweatshirt with the hood pulled over his head, appears to enter the restroom about a minute later, according to the affidavit.
Shortly after, a female student enters the bathroom and quickly walks out, according to court papers. She told investigators she saw the back of a person who appeared to be changing clothes. The person's rear was exposed, with clothes piled on the floor.
The video shows Chism leaving the restroom, returning later with a recycling barrel, and again leaving the restroom pulling the barrel -- this time with a black mask on his forehead, the court papers say. He pulls the barrel outside the building and toward the student parking lot. Investigators said there are what appear to be blood stains near the bathroom as well as on Chism's pants in the video.
After Chism was reported missing by his mother on the evening of October 22, police had his cellular phone company "ping" the location of his phone. The phone was found to be in the vicinity of the Hollywood Hits Theater, where investigators learned the teen had purchased a movie ticket and then left.
The affidavit said that when Chism was spotted by a police officer the next day, he was carrying a knife. A search of his backpack turned up a bloodstained box cutter. Asked where the blood came from, Chism allegedly responded: "The girl." He was also carrying credit cards and driver's licenses belonging to Ritzer, as well as a pair of woman's underwear.
Police discovered Ritzer's body in a wooded area near the school, covered with leaves and debris in an apparent attempt to conceal it, the court papers said. Her throat was slit.
The green recycling bin seen in the surveillance video was found 20 yards from the body. She had apparently been raped with an object. Clothing and other belongings were scattered near the body, along with blood soaked gloves Chism appeared to be wearing in the video. The handwritten "I hate you all" note was folded near her body, according to the documents.
Investigators used the affidavit to secure a warrant to search Chism's home.
Chism's mother, Diana, told investigators that she recently moved to Massachusetts from Tennessee amid a "stressful divorce" from the teen's father.
Documents filed in a Tennessee court 12 years ago shed light on a troubled relationship. The court papers showed that Chism's father agreed during a separation from his mother to have restricted time with his son, who was then 2, because of "prior physical and emotional abuse as well as alcohol abuse."
Chism's uncle, Terrence Chism Blaine, told CNN in the days after the crime that the boy's parents are now separated and that the father a former military man now lives in Florida.
The suspect's mother, Diana Chism, last month released a statement through her son's attorney saying her "heart is broken for the Ritzer family and the loss of their daughter and sister Colleen Ritzer."
The armed robbery indictment alleges that Chism, armed with a box cutter, robbed Ritzer of credit cards, an iPhone and her underwear. The aggravated rape indictment alleges that he sexually assaulted her with an object.
On the aggravated rape and armed robbery indictments, Chism was charged as a youthful offender, but prosecutors said they will move to join those charges with the murder case in Superior Court.
"This is the first step in a long process to secure justice for Ms. Ritzer and her family," Blodgett said.
Ritzer was known to her friends and family as a woman who inspired many whether in the classroom or online with her heart, intellect and positive spirit.
"She was happy," said Jen Berger, Ritzer's best friend. "I don't even know what the world is like without her. It's a scary thought."
A 2011 graduate of Assumption College who was working toward a master's degree at Salem State University, Ritzer seemed to always wear a wide smile and was approachable to students and colleagues alike, said Charlotte Dzerkacz, who became good friends with Ritzer in 2011 when they taught at the same middle school.
"She was energetic, she was compassionate," Dzerkacz said. "You couldn't ask for anything more from a teacher or a friend."
The Ritzer family released a statement saying: "We are devastated and heartbroken by the details of the horrific circumstances surrounding the death of our beautiful daughter and sister, Colleen."
A week after the slaying, about 400 Danvers High School students were among the estimated 1,000 people who gathered to pay final respects at the church where the family of popular math teacher worshiped.