A judge dismissed one of six criminal charges against the disgraced Hollywood mogul Harvey Weinstein on Thursday after prosecutors acknowledged that the lead detective in the case had committed a serious error: He had failed to tell them about a witness who cast doubt on one of Mr. Weinstein’s accusers.

The abrupt development, which occurred at a hearing in State Supreme Court in Manhattan, signaled a victory for Mr. Weinstein and raised questions about what impact the revelation might have on the broader indictment against him.

Mr. Weinstein, 66, was charged in May with raping one woman and forcing another, Lucia Evans, to perform oral sex on him. Ms. Evans, a marketing executive, had testified to a state grand jury that the forced sex act had occurred in 2004, during a casting meeting at the offices of Mr. Weinstein’s film company, Miramax, in Manhattan’s TriBeCa neighborhood.

But in a letter unsealed after Thursday’s hearing, prosecutors from the Manhattan district attorney’s office revealed that a friend of Ms. Evans had informed them in August that Ms. Evans had given her a different account of the incident. The friend, who was not identified, told prosecutors that Ms. Evans had said she willingly performed oral sex on Mr. Weinstein in exchange for the promise of an “acting job.”

The friend said that she had provided this information to the lead detective in February, more than three months before Mr. Weinstein was indicted. According to the prosecutors’ letter, the detective, Nicholas DiGaudio, “failed to inform” the district attorney’s office of “important details” of the interview. In addition, he explained to the friend that she had no obligation to cooperate with prosecutors, telling her “less is more.”

Mr. Weinstein’s lawyer, Benjamin Brafman, urged the judge on Thursday to dismiss the single charge concerning Ms. Evans in light of the new evidence. Joan Illuzzi, the lead prosecutor in the case, said she did not object to Mr. Brafman’s motion at the hearing. The judge, Justice James Burke, threw out the count.

Mr. Weinstein still faces five other charges in connection with assaults against two more women — one in 2013 and the other in 2006. The remaining charges include two counts of predatory sexual assault, which carries a maximum sentence of life in prison.

Ms. Illuzzi said the dismissal of the charge involving Ms. Evans would not “affect the strength of the larger case.” She added that prosecutors were continuing to investigate allegations against Mr. Weinstein, telling Justice Burke, “In short, your honor, we are moving full-speed ahead.”

Dated Sept. 12, the letter makes clear that Ms. Evans still insists that she “never consented to any form of sex with” Mr. Weinstein.

Complicating matters further, the letter also notes that Ms. Evans showed prosecutors an email she had written to her husband three years ago, describing the incident with different details than she had used when she spoke to the police.

Carrie Goldberg, Ms. Evans’s lawyer, said her client’s statements had been consistent and criticized Mr. Brafman for suggesting Ms. Evans had perjured herself.

She also said the district attorney, Cyrus R. Vance Jr., and his assistants should have stuck by her client.

“The first challenge they faced, rather than fighting for this case, they just dropped it,” Ms. Goldberg said. “It’s disingenuous to claim that this dismissal was based on was anything other than procedural mistakes.”

On Thursday, police officials said Detective DiGaudio had been removed from the investigation after an internal inquiry.

Ms. Evans was a college student and aspiring actress when Mr. Weinstein approached her at a nightclub in New York, she told The New Yorker last year. She met him at his office during the daytime, according to the magazine, and that is when Mr. Weinstein forced her head down to perform oral sex on him, despite her objections.

More than 80 women have accused Mr. Weinstein of sexual harassment or assault and have said they were attacked after being lured to his office or to hotel rooms with the impression they would discuss potential acting roles. The flurry of accusations spurred the global #MeToo movement. Women have since publicly shared their experiences of sexual harassment and assault by powerful men in the workplace.

Mr. Weinstein has repeatedly denied wrongdoing and maintains that the relationships with his numerous accusers were consensual.

At the hearing, Mr. Brafman argued that the dismissal of the charge related to Ms. Evans had “tainted” the entire prosecution. He said Ms. Evans had perjured herself in front of the grand jury. He also claimed that by failing to report the friend’s account to the district attorney’s office, Detective DiGaudio had “attempted to influence the integrity of the proceedings.”

In August, Mr. Weinstein’s lawyers sought to discredit another of the producer’s accusers, pointing to hundreds of emails that suggested that relationship was also consensual and lasted for years after the alleged attack.

Mr. Weinstein had been accused of raping the woman, who has not been identified, inside a hotel room at a DoubleTree in Midtown Manhattan in March 2013. The emails were made public in a motion filed by Mr. Brafman, in which he argued that the charges should be dismissed because prosecutors had withheld evidence from the grand jury.

“This case is not what it was cracked up to be when it was first announced,” Mr. Brafman said on the courthouse steps after Thursday’s hearing.

Mr. Brafman told Justice Burke that he intended to file a new motion to dismiss the indictment, and planned on issuing a subpoena to Detective DiGaudio seeking all of the interviews he conducted with witnesses. He also said he planned to subpoena a fact-checker for The New Yorker who he claimed had learned about the friend’s account before the article was published.

Natalie Raabe, a spokeswoman for the The New Yorker, said: “We stand by our reporting and fact-checking process, which was assiduous and thorough. Any assertion by lawyers for Harvey Weinstein that The New Yorker had information that contradicted Lucia Evans’s account is patently incorrect.”

Benjamin Weiser contributed to this report.

A version of this article appears in print on , Section A, Page 20 of the New York edition with the headline: One Sex Assault Count Is Dismissed in Harvey Weinstein Case. Order Reprints | Today’s Paper | Subscribe