Mr. Weinstein, who produced movies such as “Shakespeare in Love” and “Pulp Fiction,” has pleaded not guilty in State Supreme Court to five felony charges, including rape, criminal sexual assault and predatory sexual assault. If convicted on the predatory assault charge, he could be sentenced to up to life in prison.

Over three weeks, six women told the jury of seven men and five women that Mr. Weinstein attacked them, though he faces charges based on the allegations of only two of them: Jessica Mann, a former actress who said the producer raped her in 2013, and Miriam Haley, a former production assistant who said he forced oral sex on her in 2006.

The judge, Justice James M. Burke, allowed the other women to testify to allow prosecutors to establish a pattern of behavior, even though their allegations are too old to qualify as crimes under New York State law. The actress Annabella Sciorra, for instance, took the stand under the legal theory that her testimony would support the charges of predatory sexual assault.

He maintains that all the sexual encounters he had with his accusers were consensual.

The New York Post had first reported that Ms. Bashford, of the sex crimes unit, had announced her retirement on Friday, saying that after four decades in the district attorney’s office — including nine heading the unit — she was “moving on.” She did not provide further details or respond to requests for comment.

In 2015, Ambra Battilana Gutierrez, a Filipina-Italian model, had accused Mr. Weinstein of groping her breasts and trying to slide his hand up her skirt. Ms. Bashford decided not to prosecute Mr. Weinstein because she did not believe she could prove any charges against him, and because the district attorney’s office was concerned about the inconsistent accounts that Ms. Battilana Gutierrez had provided in a sexual assault case in Italy.

Cyrus R. Vance Jr., the Manhattan district attorney, was harshly criticized for the decision.

In a recent memo to his staff, Mr. Vance described Ms. Bashford as “a great leader, mentor and a pioneer in the use of DNA to prosecute cold cases and sex crimes cases.”

Back in the courtroom, after the jurors were excused for the day, defense lawyers asked the judge to prohibit prosecutors from mentioning Mr. Weinstein’s walker in their closing arguments. The producer has used a walker after having back surgery in December, and the prosecution has been trying to counter the image of a frail man, incapable of committing the crimes of which he is accused.