The sexual assault case against Harvey Weinstein was roiled Wednesday for the second time in a week by what New York City prosecutors said was a police detective’s improper conduct.

Det. Nicholas DiGaudio, whose alleged witness coaching prompted the dismissal of part of the case last week, is now accused of urging one of Weinstein’s accusers to delete material from her cellphones before she handed them over to prosecutors.

The Manhattan district attorney’s office detailed the alleged misconduct in a letter to Weinstein’s lawyer that was made public Wednesday. The new allegations involve the detective’s interactions with an unidentified woman who says Weinstein raped her in his Manhattan hotel room in 2013.

Weinstein’s lawyer, Benjamin Brafman, pounced on the revelation, saying it “even further undermines the integrity of this already deeply flawed indictment of Mr. Weinstein.”

In her letter, Assistant District Attorney Joan Illuzzi-Orbon said that during the investigation, prosecutors asked the woman to hand in any mobile phones she might have used during the time when she interacted with Weinstein.

The woman was willing to do so, Illuzzi-Orbon wrote, but was worried that the phones contained, “in addition to communications with the defendant, data of a personal nature that she regarded as private.”

She asked DiGaudio what to do. He advised her to delete anything she didn’t want anyone else to see before handing over the phone, the prosecutors said.

“We just won’t tell Joan,” DiGaudio allegedly said.

Illuzzi-Orbon said the woman didn’t delete any information and instead asked a lawyer for advice. The phones were turned over “without any deletions” Illuzzi-Orbon wrote.

The lawyer hired by the woman contacted the district attorney’s office about the detective’s conduct on Oct. 10.

Weinstein was initially charged in New York with attacking three women. The part of the case involving one of those alleged victims, Lucia Evans, was dismissed last week after prosecutors said that DiGaudio had advised a witness to keep quiet about doubts whether Evans’ alleged sexual encounter with Weinstein was consensual.

DiGaudio’s union defended his conduct.

“A woman should not have to surrender confidential intimate information that’s immaterial to the case to defend herself against a sexual predator. That’s being victimized twice. Detective DeGaudio was sensitive to that,” Detectives’ Endowment Association President Michael Palladino said in a statement. “This appears to be just another smear campaign against Detective DeGaudio to cover up the Manhattan DA’s own incompetence.”

Three of the five remaining criminal charges against Weinstein stem from the alleged rape. Two other charges allege he performed a forcible sex act on a different woman in 2006.

Weinstein denies all allegations of nonconsensual sex.