NEW YORK — A deal was reached between lawyers for victims of Jeffrey Epstein and the Justice Department to protect the identities of nearly 100 women whose lives were allegedly harmed after the government began releasing millions of documents last week, a lawyer told a federal judge on Tuesday.

Judge Richard M. Berman in Manhattan cancelled a hearing scheduled for Wednesday after he was notified by Florida attorney Brittany Henderson that “extensive and constructive discussions” with the government had resulted in an agreement.

Henderson and attorney Brad Edwards had complained to Berman in a letter Sunday that “immediate judicial intervention” was needed after there were thousands of instances when the government had failed to redact names and other personally identifying information of women sexually abused by Epstein.

Among eight women whose comments were included in the lawyers’ Sunday letter, one said the records’ release was “life threatening” while another said she’d gotten death threats and she was forced to shut down her credit cards and banking accounts after their security was jeopardized.

The lawyers had requested that the Justice Department website be temporarily shut down and that an independent monitor be appointed to ensure no further errors occurred.

Henderson did not say what government lawyers said to ensure identities would be protected going forward or what the agreement consisted of.

“We trust that the deficiencies will be corrected expeditiously and in a manner that protects victims from further harm,” she wrote to the judge.

The Justice Department did not immediately respond to a request for comment.

The judge wrote in an order cancelling the Wednesday public hearing that he was “pleased but not surprised that the parties were able to resolve the privacy issues.”

On Monday, U.S. Attorney Jay Clayton in Manhattan wrote in a letter filed in Manhattan federal court that errors blamed on “technical or human error” occurred on redactions during the document release.

He said the Justice Department had improved its protocols to protect victims and had taken down nearly all materials identified by victims or their lawyers, along with many more that the government had found on its own.

Mistakes in the largest release of Epstein documents yet included nude photos showing the faces of potential victims as well as names, email addresses and other identifying information that was either unredacted or not fully obscured.

Most of the materials that were released stemmed from sex trafficking probes of Epstein and his former girlfriend, British socialite Ghislaine Maxwell, who is serving a 20-year prison sentence after she was convicted in December 2021 at a New York trial.

Epstein took his life in a federal jail in New York in August 2019 while awaiting trial on sex trafficking charges.