(Bloomberg) -- Donald Trump dropped his lawsuit against New York’s attorney general over the state’s $250 million fraud claims against him and his businesses, hours after the former president and his lawyer were ordered to pay almost $1 million for a “frivolous” suit against Hillary Clinton.

Trump filed a one-page notice of voluntary dismissal Friday with US District Judge Donald Middlebrooks in West Palm Beach, Florida — a rare retreat for Trump in his long-running clash with New York’s top law enforcement officer, Letitia James.

The notice didn’t elaborate on why Trump sought the dismissal, but it was filed about 12 hours after the same judge ordered him and his lawyer to pay $937,989 in legal fees and expenses for the “implausible” suit against Clinton last year. Trump had accused her and dozens of other former government officials and Democratic operatives of conspiring against him with the Russia probe — flimsy claims that Middlebrooks held were brought to advance a false political narrative.

Trump’s lawyer Alina Habba didn’t immediately respond to a request for comment on the voluntary dismissal.

Removing Obstacle

Dismissal of the Trump suit against James removes an obstacle to her wide-ranging fraud claims in New York against Trump, three of his children and the Manhattan-based Trump Organization, which is set for trial in October. The Trumps are accused of manipulating the value of assets for years to deceive banks and insurers. They have all denied wrongdoing.

The complaint in Florida against James, filed in November, accused the Democrat of bringing her suit as part of a “relentless, pernicious, public, and unapologetic crusade against President Trump.” It also accused her of trying to destroy him “personally, financially and politically.” 

But James has defended her probe on multiple occasions in New York courts. She’s cited extensive evidence of potential fraud and a paper trail of explanations for the investigation that she said had nothing to do with politics.

Middlebrooks in December denied Trump’s request for an injunction against James that would have hindered a court-appointed monitor over the Trump Organization as well as James’s efforts to gather evidence. In that ruling, the judge said the case was likely to fail and warned that it “has all the telltale signs of being both vexatious and frivolous.”

The judge used similar language in criticizing Trump’s suit against Clinton.

“The Judge’s strong ruling in the Clinton matter, including the finding that Trump and his legal team were repeatedly misusing the courts to seek revenge on political adversaries, likely forced Trump and his attorneys to reconsider the case that they had brought against Ms. James,” said Michel Huff, a criminal defense attorney in California who isn’t involved in the case. The move “would appear to be an acknowledgment that his allegations against Ms. James have no legal merit,” Huff said.

Dropping the case avoids what could have resulted in another dismissal and another round of sanctions from the judge, who said in his ruling in the Clinton case that Trump has a history abusing the courts to target his foes.

Read More: Trump Florida Suit Is ‘End Run’ Around NY Fraud Case, AG Says

(Updates with comment from legal expert.)

©2023 Bloomberg L.P.