SALEM, Mass. — A teenager charged with raping and killing his high school math teacher had a bloody box cutter and women’s underwear in his backpack when he was detained, two police officers testified at a hearing Friday.

Topsfield Officers Neal Hovey and Joseph DeBernardo said they found Philip Chism, now 15, carrying Colleen Ritzer’s ID and credit cards. They were responding to a report of a black male walking after dark on the side of a road.

After bringing Chism back to the police station, Hovey said they found the box cutter and panties in his backpack.

When Hovey asked him whose blood was on the box cutter, the officers said Chism replied: “The girl.”

DeBernardo said he asked Chism where the girl was. He responded: “Buried in the woods.”

The officer then said he asked: “Can we help her?” Chism said no.

The officers testified at a hearing where a judge was considering a request by Chism’s lawyers to have his confession suppressed. They say police coerced him into waiving his rights and making detailed statements about the murder.

But prosecutors maintain that Chism and his mother never absolutely invoked the need for a lawyer. They say Chism’s mother considered it but ultimately left it to her son to decide if he wanted to speak with law enforcement, which he did.

Chism has been charged as an adult with murder and aggravated rape in the October 2013 killing of Ritzer, a popular 24-year-old teacher at Danvers High School. He has pleaded not guilty.

The officers testified Friday that when they found Chism walking late at night along Route 1, he appeared evasive and didn’t make eye contact, saying he was heading “nowhere” and had been “walking for days” with a backpack that had “survival gear.”

The officers said they drove Chism back to the police station after learning he was a teenager who had been reported missing in nearby Danvers that night.

The officers said they read Chism his rights after he said the blood on the box cutter was from “the girl.” They testified Chism understood his rights and continued to answer questions from the officers. They also said they took his sneakers, sweatshirt and a ski mask, all of which appeared to have blood on them.

The hearing is expected to continue with testimony Jan. 16, after which the judge will rule on the defense’s request to suppress the confession. Chism’s lawyers have also requested to seal from public view Chism’s confession and the interrogation videotape.

Authorities say surveillance video from Oct. 22, 2013 shows Chism following Ritzer into the bathroom, wearing gloves and a hood, then later walking out of the bathroom alone.

A short time later, the video shows Chism pulling a recycling barrel through the school and outside.

Ritzer’s body was later found in nearby woods, naked from the waist down and with her throat slit and a note that read: “I hate you all.”

A recycling barrel was found near Ritzer’s body. Authorities said she was sexually assaulted with a stick.

Prosecutors alleged in previous court filings that after killing Ritzer, Chism took her cellphone, which he destroyed, and her wallet, from which he used a credit card to buy fast food and attend a movie at the mall.

Chism, who had recently moved to Massachusetts from Clarksville, Tennessee, has also pleaded not guilty to attempted murder and other charges stemming from an assault on a Department of Youth Services worker while in custody for Ritzer’s killing.