A federal judge has voided President Donald Trump's settlement with the Internal Revenue Service, dismantling a deal that would have created a $1.8 billion taxpayer-backed compensation fund and granted Trump personal protection from IRS tax audits in return for abandoning a $10 billion lawsuit against the agency.

U.S. District Judge Kathleen Williams ruled Monday that the litigation lacked the basic legal conflict required for a federal court to exercise jurisdiction. In a 56-page order, Williams said Trump and the federal government under his administration weren't genuinely adverse parties and had effectively used the lawsuit to formalize an agreement benefiting the president and potentially his political allies.

"There was never adverseness between the Parties; there was never a case or controversy; and there was never a question as to who would prevail," Williams wrote, according to the court order.

The ruling targets an unusual settlement unveiled in May between Trump and the IRS. Under its terms, Trump would have dropped his $10 billion lawsuit against the agency, while the government agreed to protections shielding him from IRS audits and to establish a $1.8 billion fund financed by taxpayers.

Williams said the lawsuit had been used to "provide some legitimacy to an agreement to confer immunity to people and entities affiliated with the President and to earmark billions of dollars from American taxpayers to redress grievances not defined in the law."

The proposed program, described as an anti-weaponisation fund, was designed to compensate people who claimed they had been unfairly targeted by the federal government. Its potential beneficiaries became a central issue in a separate legal challenge brought by two Virginia plaintiffs.

According to their court filings, the plaintiffs argued that the compensation structure was discriminatory because people such as themselves could be excluded while others with political connections to the administration might qualify. They specifically raised the possibility that people prosecuted in connection with the Jan. 6, 2021, attack on the U.S. Capitol could benefit, including defendants convicted of assaulting police officers.

The fund was abandoned in early June, about a week after a federal judge in Virginia temporarily blocked Justice Department officials from establishing it. Williams's subsequent ruling went further by voiding the broader IRS settlement that had provided the legal framework for both the compensation program and Trump's audit protections.

The judge also took disciplinary action involving lawyers connected to the case. Williams referred Trump attorney Alejandro Brito to the Florida Bar for possible disciplinary proceedings and prohibited another lawyer, Daniel Epstein, from accepting new cases in the Southern District of Florida for at least one year.

Williams ordered that copies of her decision be sent to the New York State Bar and the District of Columbia Bar. Acting Attorney General Todd Blanche and Associate Attorney General Stanley Woodward, who are members of those bars, had signed documents associated with the settlement.

A spokesman for Trump's legal team defended the president's lawsuit and focused on the conduct that originally triggered the dispute. The spokesman said the IRS "wrongly allowed a rogue, politically-motivated employee to leak private and confidential information" involving Trump, his family and the Trump Organization.

"President Trump continues to hold those who wrong America and Americans accountable," the spokesman added.

Trump's $10 billion lawsuit grew out of the disclosure of his confidential tax information by former IRS contractor Charles Littlejohn. The leaked material contributed to a New York Times investigation that reported Trump paid $750 in federal income tax during the year he first won the presidency.

The controversy over the tax leak and the structure of the settlement, however, became separate legal questions in Williams's analysis. Her order focused on whether a legitimate dispute existed when Trump's administration and Trump himself entered an agreement that was then presented to a federal court.

By finding that "there was never a case or controversy," Williams rejected the legal foundation of the settlement rather than merely questioning whether its financial terms were excessive. Her ruling also prevents both sides from citing the voided agreement in future proceedings.