Former President Donald Trump and New York Attorney General Letitia James.
CNN  — 

Former President Donald Trump on Friday withdrew his lawsuit seeking to block the New York attorney general’s office from accessing materials from his private trust.

In a one-page notice filed with Judge Donald Middlebrooks, Trump’s attorney, Timothy Weber, said he was voluntarily dismissing the lawsuit. No further reason was given.

Last month, Middlebrooks rejected Trump’s effort to obtain a temporary injunction to block New York Attorney General Letitia James, a Democrat, from obtaining documents from the trust, saying Trump had “no substantial likelihood of success on the merits.” A motion to dismiss the lawsuit was still pending.

The move comes one day after Middlebrooks sanctioned Trump and another one of his attorney’s $937,989 for a lawsuit Trump brought against Hillary Clinton, former top Justice Department officials and several others alleging they conspired against him in the 2016 campaign.

“This case should never have been brought. Its inadequacy as a legal claim was evident from the start,” the judge wrote Thursday. “No reasonable lawyer would have filed it. Intended for a political purpose, none of the counts of the amended complaint stated a cognizable legal claim.”

James’ office subpoenaed records relating to the Donald J. Trump Revocable Trust, which Trump used to hold his companies when he became president in 2017. In August, attorneys with James’ office emailed Trump’s attorneys requesting certain trust documents they had sought through a subpoena. The following month, James sued Trump, his three eldest children and the Trump Organization, alleging that they were involved in a decade-long fraud. Trump has denied any wrongdoing.

In response to the records request, Trump sued James in Florida to try to block her access to the trust records. Trump alleged that the trust is protected by privacy rights in the Florida Constitution and that James was trying to control, gain access to and publicly reveal the terms of the trust.

But in his decision last month to deny Trump’s request for a preliminary injunction, Middlebrooks ruled that James’ office “raises four reasons – all of which are likely correct – why Plaintiff has no substantial likelihood of success on the merits.” The judge said that Trump’s claims that he would be harmed by turning over records to the attorney general’s office were “quintessentially speculative” since the state had indicated to the former president’s attorneys that it would receive documents with redactions of estate-planning portions.

This story has been updated with additional details about the lawsuit.

CNN’s Tierney Sneed contributed to this report.