Disgraced film producer Harvey Weinstein will face a new trial in the autumn after his state rape conviction was overturned, a judge ruled on Wednesday.
Manhattan prosecutors told the packed court: "We believe in this case and will be retrying this case."
An appeals court ruled last week that Weinstein did not receive a fair trial in 2020.
But he remains jailed because of a separate rape conviction in California.
Weinstein was sentenced to 16 years in prison in that case.
At the court in New York on Wednesday, prosecutors said they would be ready to retry the case by September.
At the start of proceedings, Weinstein was brought in in a wheelchair, wearing a navy-blue suit and a light blue tie.
He appeared to be in good spirits, and smiled and waved to his team.
Assistant District Attorney Nicole Blumberg told the judge that one of Weinstein's victims was also in court.
She said the "sexual assault survivor" was there "to show she's not backing down and is here to make sure justice is served once again. He may have power and privilege, but she has the truth."
The judge overseeing the case ruled that Weinstein's retrial will happen sometime after the Labour Day holiday on 2 September.
Last week, the New York state appeals court ruled that the judge overseeing the former Hollywood mogul's case had erred when he allowed the testimony of women who made allegations about Weinstein for which he was never charged.
The judge had "erroneously admitted testimony of uncharged, alleged prior sexual acts against persons other than the complainants of the underlying crimes", the appeals court ruled by a vote of 4 to 3.
The decision also said the trial judge compounded the error by letting Weinstein be cross-examined in a way that portrayed him in a "highly prejudicial" light.
"The remedy for these egregious errors is a new trial," the court found.
Weinstein has always maintained his innocence and his defence team said at the time of the New York trial that sex between the movie executive and accusers was consensual.
Arthur Aidala, the movie mogul's lawyer, hailed the decision as a "victory for every criminal defendant in the state of New York".
Weinstein was taken to hospital a few days ago for what his lawyer described as "immediate medical attention" and "a myriad of tests".