NEW YORK (AP) — A New York judge said Wednesday he will lift Donald Trump’s contempt of court order if the former president meets certain conditions, including paying $110,000 in fines he’s racked up for being slow to respond to a subpoena for evidence in a civil investigation into his business practices.

In one of two Trump subpoena fights before courts on Wednesday, Judge Arthur Engoron said he will lift his finding of contempt if Trump submits additional paperwork by May 20 detailing efforts to search for the subpoenaed records and explaining his and his company’s document retention policies.

The judge also requires that a company Trump hired to aid in the search, HaystackID, finish going through 17 boxes kept at an off-site storage facility, and for that company to issue a report on its findings and turn over any relevant documents.

Engoron found Trump in contempt on April 25 and fined him $10,000 per day for not complying with New York Attorney General Letitia James’ subpoena. While appealing the ruling, Trump’s lawyers repeatedly asked Engoron to reconsider, leading to his order Wednesday outlining criteria for lifting the sanctions.

Also Wednesday, the appellate division of the state’s trial court was scheduled to hear oral arguments in a related subpoena matter: Trump’s appeal of the judge’s Feb. 17 ruling requiring him to answer questions under oath in James’ investigation.

Trump’s lawyers contend James is using her civil investigation to gain access to information that could then be used against the Republican former president in a parallel criminal investigation being conducted by the Manhattan District Attorney, Alvin Bragg, a Democrat.

James, also a Democrat, has said her three-year investigation has uncovered evidence that Trump’s company misstated the value of assets like skyscrapers and golf courses on financial statements for over a decade.

Trump has denied the allegations, calling James’ investigation “racist” and a “witch hunt.” James is Black.

Engoron ordered Trump to pay $110,000 because that is the total amount of fines he accrued through May 6, when Trump’s lawyers submitted 66 pages of court documents detailing the efforts by him and his lawyers to locate the subpoenaed records.

Engoron said he could reinstate the fine, retroactive to May 7, if the conditions he set forth on Wednesday are not met. He instructed Trump to pay the money directly to James’ office and for James’ office to hold the money in an escrow account while Trump’s appeal of the contempt finding plays out.

“For years, Mr. Trump and the Trump Organization have tried to thwart our lawful investigation, but today’s decision makes clear that no one can evade accountability,” James said in a statement. “We will continue to enforce the law and seek answers as part of this investigation.”

A message seeking comment was left with Trump’s lawyer.

James asked Engoron to hold Trump in contempt of court after he failed to produce any documents to satisfy a March 31 deadline to meet the terms of her subpoena seeking numerous documents, including papers pertaining to his annual financial statements, development projects, and even communications with Forbes magazine, where he sought to burnish his image as a wealthy businessman.

Trump’s lawyer, Alina Habba, said in a May 6 court filing that he responded to the subpoena completely and correctly and that no relevant documents or information were withheld from James’ investigators.

Habba said searches were conducted at Trump’s offices and private quarters at his golf club in Bedminster, New Jersey, and his residence in Mar-a-Lago, Florida but didn’t find any relevant documents that hadn’t already been produced. Her filing also detailed searches of other locations including file cabinets and storage areas at the Trump Organization’s offices in New York.

In a separate sworn affidavit included with the filing, Trump stated there aren’t any relevant documents that haven’t already been produced.

He added that he owns two cell phones: an iPhone for personal use that he submitted in March to be searched as part of the subpoena, then submitted again in May; plus a second phone he was recently given that’s only used to post on Truth Social, the social media network he started after his ban from Twitter, Facebook and other platforms.

Engoron’s conditions for lifting the contempt finding were largely in line with ones James’ office listed in its response to Habba’s May 6 filing.