Sexual assault cases are notoriously challenging to prove in court; indeed, Mr. Vance dropped both earlier cases because of questions about whether witnesses would be believed. There is no doubt that the ground has shifted since complaints about Mr. Weinstein touched off the global #MeToo movement, but Mr. Vance’s office will face a long legal battle against a wealthy defendant and one of the city’s best defense lawyers, who will spare no effort to portray Mr. Weinstein as someone who behaved badly but did not break the law by having consensual sex with women seeking to further their careers.

Mr. Vance’s assistants must first present the case to a grand jury and obtain an indictment. The prosecution will have to prove Mr. Weinstein used physical force or threats of harm to get what he wanted, a high bar in cases with little or no physical evidence. The woman in the rape case has not been publicly identified, but prosecutors have said the attack occurred in Manhattan more than five years ago — a gap in time that creates an additional hurdle for prosecutors. Mr. Vance himself was careful not to crow on Friday, saying, “We are at the beginning, not the end.”

A year ago, Mr. Vance could make a case that he was a champion for victims of sexual violence, domestic abuse and sex trafficking. He had spent more than $38 million in forfeited funds to clear a backlog of rape-evidence kits across the country and had successfully convicted many people charged with the trafficking of underage prostitutes. His sex crimes unit had won convictions in difficult rape cases and had successfully pioneered strategies for pursuing cold cases with DNA evidence. Since 2010, when Mr. Vance took office, through 2017, his sex crime prosecutors have won 83 percent of their felony trials.

Mr. Vance also established the city’s first Family Justice Center in his office, improving how victims of domestic abuse and their cases were handled. His prosecutors had convicted men who assaulted their domestic partners even when the victims were not willing to cooperate. His long list of supporters included feminists like Gloria Steinem.

Still, there was grumbling among advocates for rape victims about his office’s grueling questioning of women raped by acquaintances before an arrest was made. Several critics, speaking on the condition of anonymity to avoid antagonizing prosecutors, said the questioning of rape victims in Manhattan was unnecessarily harsh.