The one-time lead investigator in the New York sex-assault probe of Harvey Weinstein once told an accuser to delete personal cell phone files to hide it from prosecutors, the Manhattan District Attorney's Office revealed on Wednesday.

One of the two accusers with cases still standing against Weinstein said she once worried about turning over cell phones to prosecutors because the devices might have personal information she didn't want to be shared, according to a letter prosecutor Joan Illuzzi-Orbon wrote to Weinstein's lawyer Ben Brafman.

Harvey Weinstein arrives at the State Supreme Court to face new charges in New York on July 9, 2018. Justin Lane / EPA

NYPD Det. Nicholas DiGaudio told the victim to simply delete files before surrendering phones, prosecutors said.

"According to Complainant 2, Detective DiGaudio's response was that Complainant 2 should delete anything she did not want anyone to see before providing the phones to our office," Illuzzi-Orbon wrote. "According to Complainant 2, Detective DiGaudio then added, `we just won't tell Joan.' "

Despite that advice, the woman still turned over all phones she was using at times she had communications with Weinstein. The phones were surrendered "without any deletions," according to Illuzzi-Orbon.

The woman "indicates that at no time did Detective DiGaudio or anyone else influence her testimony on any evidence she produced," the prosecutor wrote.

The disgraced movie executive is accused of sexual assault in a five-count indictment alleging that he raped one woman in his Manhattan hotel room in 2013 and forced a sex act on another woman in 2006.

Assistant District Attorney Joan Illuzzi-Orbon. Bebeto Matthews / AP file

The embarrassing revelations come one week after prosecutors dropped one of the six charges against Weinstein. Illuzzi-Orbon admitted that DiGaudio coached a witness who appeared to have memories counter to victim Lucia Evans.

The one charge relating to Evans' allegations was dropped last week.

Even before Wednesday's revelation, Brafman had said DiGaudio had already tainted the entire prosecution beyond repair.

"This new development even further undermines the integrity of an already deeply flawed indictment of Mr. Weinstein," Brafman said in a statement Wednesday night. The defense lawyer said he wants all five remaining counts dismissed.

A rep for the union representing NYPD detectives said the DA's office "needs to enter the 21st Century."

"This is the age of technology. People keep loads of personal info on their phones that they prefer remains confidential," said Detectives Endowment Association President Michael Palladino.

"This appears to be just another smear campaign against Detective DiGaudio to cover up the Manhattan DA’s own incompetence."

Palladino continued: "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 DiGaudio was sensitive to that."

Northwestern University law professor Deborah Tuerkheimer, a former New York sex crimes prosecutor, said the disclosure is damaging — but not deadly blow for the case.

"It seems right that the DA's office would disclose this. And if no evidence was lost, then that's good news," she said. "But it is problematic to have a detective to tell a witness to delete potential evidence."

She added: "It's not the way you'd want a detective to behave in this case, or any case. It’s unfortunate that this happened."