SALEM — Prosecutors urged a judge Monday to keep records sealed in the slaying of a Danvers High School teacher to avoid endangering a grand jury investigation into the 14-year-old student accused of killing her.

Philip Chism, a junior varsity soccer star, was arrested Oct. 23, the day that the body of math teacher Colleen Ritzer was found in the woods behind the school. He is facing a murder charge as an adult.

Prosecutors said the names of witnesses, including Chism’s classmates, and still-unreleased details of the crime should remain sealed until the grand jury finishes its work by Nov. 22. They said releasing the information contained in a search warrant affidavit and other records could influence witness testimony, violate the Ritzer family’s privacy, and endanger Chism’s right to a fair trial.

News organizations, including the Globe, had sought the records in court since the information could be made public by now under state law. State investigators have interviewed Chism and searched his family’s basement apartment in Danvers, but have not disclosed what they found.

Lauranzano had impounded records in the days immediately following the slaying, but that order expired Monday. He took the matter under advisement.

Michael J. Grygiel, an Albany, N.Y., lawyer representing the Associated Press, GateHouse Media, and the Eagle Tribune Publishing Co., said in court that there is no evidence that media attention would influence the investigation or witness testimony. And he said public interest in the case is high at a time when school violence is “epidemic.”

“Today, impoundment is not justified,” he said.

Lawyers for Ritzer’s family and for Chism also supported impounding the records.

Daniel J. Murphy, who represents the Ritzers, said the family is still devastated by her death, having buried Ritzer only last week. He noted that the victim had a younger sister and that the family has not received all details of the crime, only “as much as they can digest.”

“Give them some time,” he urged the judge. “They haven’t asked for forever.”

Susan Oker, one of Chism’s court-appointed lawyers, asked the judge to impound the information even longer, through the end of Chism’s trial, saying that pretrial publicity of the case posed a “risk of infecting the potential jury pool.”

“It implicates profound constitutional rights,” she said.

O’Sullivan said in court that Ritzer, a beloved 24-year-old teacher, is an innocent victim in the case. “Let me be very clear: There is absolutely no evidence of any misconduct or wrongdoing of any sort by the victim in this case, Miss Ritzer,” he said in court.

Chism, who moved to Danvers this past summer from Tennessee with his mother and sisters, has been ordered held without bail. Friends and relatives have said he was unhappy about the move, but described him as friendly and sweet. He had made friends in Danvers and was a soccer standout.

Police have said Ritzer was stabbed and cut with a box cutter, possibly in a school bathroom. The motive remains unclear. Students have said that on the day she disappeared, Oct. 22, Ritzer had asked Chism to stay after class to help him prepare for a test.