One of those lawyers, Jay Lefkowitz, also lobbied Mr. Vance’s office to have Mr. Epstein’s sex-offender status knocked down.

“Was it preferential treatment at the highest level, or is it that the Manhattan district attorney’s office is not run well enough to ensure that sex crimes are investigated and taken seriously?” said Sonia Ossorio, the president of the New York City arm of the National Organization for Women. “Either way it’s unacceptable.”

For his part, Mr. Vance denied in an interview that his office had ever given preferential treatment to any defendant because of wealth or social status. He said that claim is “simply wrong and is inconsistent and opposite to what I believe in and to what the lawyers in this office believe in.”

Ms. Gaffney, who was a senior sex crimes prosecutor, argued during the hearing that Mr. Epstein did not merit the highest offender status because he had not been indicted in Florida on all of the accusations against him. Several of his accusers had refused to cooperate, she told the judge, court records show.

She made the argument even though the New York state panel that evaluates people convicted of sex crimes — the Board of Examiners of Sex Offenders — had calculated that Mr. Epstein had a high risk of reoffending. His risk assessment was 130 — “solidly above” the 110 threshold for a level 3 offender, court records show.

The board had based its decision, in part, on a 22-page affidavit from detectives in the Palm Beach Police Department that detailed complaints from minors who said Mr. Epstein had molested them — a document Ms. Gaffney also had.

Yet Ms. Gaffney argued — i ncorrectly it turned out — that because Mr. Epstein was indicted on only one of those crimes, the other allegations could not be considered when determining sex-offender status.