An appeals court has ruled that a New York Times reporter will not have to turn over notes from an interview with Baby Hope’s accused killer or testify at the man’s upcoming trial.

Lower-court Manhattan Judge Bonnie Wittner had ordered that Times writer Frances Robles would have to testify against the 4-year-old’s alleged murderer, Conrado Juarez, regarding a jailhouse interview she conducted with Juarez after his arrest in 2013.

Juarez had told Robles that he helped dispose of the body of the girl, named Anjelica Castillo, but also said his confession to her murder and sexual assault was false and had been coerced.

Prosecutors wanted the journalist to take the stand and hand over her notes, but the Appellate Court issued a ruling Thursday saying her testimony was not “critical or necessary” to the state’s case against Juarez, who confessed on videotape after hours of grueling questioning.

The girl’s tiny body was found in a cooler off the Henry Hudson Parkway in 1991. She had been sexually assaulted and suffocated.