NEW YORK (NYTIMES) - Just five months ago, disgraced Hollywood mogul Harvey Weinstein was escorted in handcuffs past a phalanx of reporters and photographers and into the Manhattan Criminal Courts Building, where a grand jury had voted to indict him, setting the stage for arguably the most important prosecution of the #MeToo era.
It was a moment of political redemption for the Manhattan district attorney, Mr Cyrus Vance Jr, who had been fiercely criticised for not bringing charges against the producer in 2015.
It also marked a cultural turning point for many women, a confirmation that Weinstein's harassment of women went beyond boorish behaviour: Prosecutors said he broke the law.
But now the case against Weinstein appears to be fraying. A detective failed to turn over important evidence to prosecutors. A judge dismissed part of the indictment. Evidence has emerged undermining the allegation of one of the accusers.
In addition, Mr Vance's assistants thought that once they filed charges, a flood of new complaints might lead to more victims being added to the case. It has not worked out that way.
Prosecutors maintain they are still interviewing potential victims, and that the evidence remains strong enough to win a conviction, even with just two women to testify against Mr Weinstein.
"We are moving full speed ahead," the lead prosecutor on the case, Ms Joan Illuzzi, said in court.
But Weinstein's lawyer, Mr Benjamin Brafman, has argued that the entire indictment was contaminated because prosecutors failed to show the grand jury evidence favourable to his client. He has said he will ask the judge to throw the charges out.
"Mr Weinstein's case was not presented in a fair manner and it is just covered in taint," Mr Brafman said. "It is not something you can just erase with the dismissal of just one count."
So far, Justice James Burke has only dismissed one charge related to Ms Lucia Evans, a marketing executive. She had alleged that the powerful film producer forced her to perform oral sex on him at his Manhattan office in 2004, when she was an aspiring actress.
In February, the lead detective on the case, Mr Nicholas DiGaudio, interviewed a friend of Ms Evans who told him that Ms Evans had given her a different story: That she willingly performed oral sex on Weinstein in exchange for an acting role.
Ms Illuzzi said in a letter to the court that the detective never provided her with that information, and had even taken it a step further to tell Ms Evans' friend she had no obligation to cooperate with prosecutors, suggesting "less is more".
The letter said prosecutors also were unaware of an e-mail that Ms Evans had written to her husband that provided a different version of the incident than she had given police.
The detective, through his union, has denied the prosecutor's account, saying that he "disclosed all of the information in question".
The detective's grave mistake meant a grand jury was not aware of the friend's statements three months later when it decided to indict Weinstein, 66, on charges he sexually assaulted Ms Evans and raped a second woman at a hotel in 2013.
The indictment was updated in July, adding the accusation that Weinstein sexually assaulted a third woman at his townhouse in 2006.
Nearly two weeks ago, it came to light that Mr DiGaudio had also urged one of Weinstein's accusers to delete embarrassing material from her mobile phones before giving them to prosecutors, further eroding his credibility. (After consulting with a lawyer, the woman turned her phones over to prosecutors without deletions.)
In theory, the dismissed charge should not hurt the prosecution's chances at trial, some experienced trial lawyers said. Five counts remain.
"The other cases and witnesses exist unto themselves," said Mr Evan Krutoy, a former Manhattan prosecutor who now focuses on internal sexual harassment investigations for companies.
"At trial, a reasonable, fair juror will independently assess those complainants."
But Ms Barbara Barron, a former prosecutor who teaches law at Hofstra University, said that the defence can use the judge's decision regarding Ms Evans to cast doubt on the entire case, not just at trial, but also in the battle for public opinion.
"To have this, post indictment, is a horror," she said.
The collapse of the component related to Ms Evans could also cause other potential witnesses to think twice before joining in on a criminal complaint against Weinstein, hurting the investigation, one former prosecutor said.
It also means prosecutors may have to avoid calling Mr DiGaudio as a witness. A skilful defence lawyer like Mr Brafman will use the detective's mistake to make jurors wonder what else police might have kept from prosecutors.
"It's almost like the entire case is dismissed - that's the way jurors could be reading it," said Mr Kevin P. O'Donnell, a defence lawyer and former Queens prosecutor. "That cop completely jeopardised the district attorney's case."
Prosecutors face other hurdles proving the remaining charges, as well. In August, the defence unearthed a trove of e-mails between Weinstein and the woman who alleges he raped her in 2013, court documents said.
The correspondence suggests the woman had a consensual affair with Weinstein that continued long after the alleged rape.
Mr Mark Bederow, a criminal defence lawyer, said the e-mails erode the victim's credibility in a case that depends almost entirely on her word.
The prosecutors, he said, will "have to explain why someone would reach out to Harvey Weinstein after being raped by him. That's going to be tough".
Defence lawyers said the third case - a woman who said Weinstein physically forced her to submit to oral sex in his townhouse in 2006 - is also likely to boil down to whether jurors believe her account or his.
Complicating matters for the district attorney's office, two experienced prosecutors assigned to the Weinstein case, Ms Rachel Hochhauser and Ms Jennifer Gaffney, resigned last month.
The office said their departures were unrelated to the Weinstein case. They have declined to comment.
The communication missteps between Mr DiGaudio and prosecutors, which led to the dismissal of part of the indictment, goes back to a 2015 dispute over a sexual assault allegation against Weinstein by an Italian model, former law enforcement officials said.
Detectives were infuriated when Mr Vance decided not to press charges against Weinstein even though the model, Ms Ambra Battilana Gutierrez, had obtained a recording of the producer apologising when she asked him why he had groped her breasts.
The feud worsened when the district attorney's office issued a statement suggesting police had not consulted sex crime prosecutors before sending Ms Battilana Gutierrez to secretly tape Weinstein.
"The district attorney's office acted in a way that lost the trust of the police department and sowed a deep distrust between the two agencies," one former prosecutor said, on the condition of anonymity because she was not authorised to speak.
Mr Danny Frost, a spokesman for the Manhattan district attorney's office, said the relationship between the two law enforcement agencies "has never been stronger".
In March, Governor Andrew Cuomo ordered the state attorney-general to review the district attorney's and the police department's working relationship on sexual assault cases, including the case involving Ms Battilana Gutierrez.
That investigation has been suspended, pending Weinstein's trial.
At the time, Mr Vance was under heavy political pressure from women's rights advocates to bring charges against Weinstein.
His political opponents had raised questions about whether Weinstein received special treatment from Mr Vance's office when Ms Battilana Guitierrez first made her allegations in 2015.
They pointed out that the producer's lawyer, Mr Elkan Abramowitz, was a former partner of Mr Vance's and a big contributor to the district attorney's campaign.
As the spring wore on, the prosecutor in charge of the investigation, Ms Maxine Rosenthal, was still uncertain after interviewing Ms Evans that the evidence was strong enough to stand up in court, a person with knowledge of the investigation said, speaking on the condition of anonymity.
Mr Vance replaced Ms Rosenthal with Ms Illuzzi, a veteran prosecutor who had recently won a big victory for Mr Vance, convicting Pedro Hernandez for the four-decade-old murder of Etan Patz. Within a month, a grand jury was hearing testimony.
It was not the first time Mr Vance had turned to Ms Illuzzi. He made a similar decision in 2011 when he was trying to decide whether to bring sexual assault charges against Dominique Strauss-Kahn, the managing director of the International Monetary Fund.
Sex crime prosecutors had baulked at the case, having doubts about the credibility of Strauss-Kahn's accuser, a hotel maid who said he had forced her to have sex.
Mr Vance brought in Ms Illuzzi, but in the end, she moved to have the charges dismissed after it was discovered the victim had lied to prosecutors "in describing matters of both great and small significance".
Ms Sonia Ossorio, president of the state chapter of the National Organisation for Women, said there is a lot at stake for the #MeToo movement.
Many women see the trial as one of the most important cases happening in this country, she said, and are anxious for the police and the district attorney's office to work together "for a meticulous investigation and prosecution".
"Harvey Weinstein needs to be held accountable," she said. "He can't get away with it again."