A United States federal judge has declared a civil settlement between President Donald Trump and his own Department of Justice unlawful, characterizing the arrangement as an act of self-dealing.

US District Judge Kathleen Williams issued the ruling on Monday, stating that the Department of Justice and President Trump were not genuinely adverse parties in the litigation, a requirement for civil lawsuits under the U.S. Constitution.

The judge's decision stemmed from a $10 billion lawsuit Trump initiated against the Internal Revenue Service (IRS) in January. He accused the agency of failing to prevent the leak of his tax returns during his presidency. Subsequently, the DOJ reached a $1.8 billion settlement with Trump, intended to fund compensation for alleged victims of government "weaponization" and "lawfare," and also providing Trump with broad tax protections.

Judge Williams wrote that the nature of the lawsuit and the actions of the parties and their counsel indicated an attempt to leverage the court system for legitimacy. She stated the aim was to grant immunity to individuals and entities connected to the President and to allocate billions of taxpayer dollars for grievances not legally defined.

This ruling comes after the administration had already withdrawn its support for the so-called "Anti-Weaponization Fund" due to opposition from both Republican and Democratic lawmakers. Nevertheless, the judge's decision represents a significant setback for the administration and could have political repercussions for acting Attorney General Todd Blanche, who is scheduled for a confirmation hearing next week.

Judge Williams pointed to evidence suggesting Blanche acted on behalf of both Trump and the DOJ, noting his apparent ability to represent both plaintiffs and defendants. The judge also referred a Trump attorney in the case, Alejandro Brito, and senior Justice Department officials who approved the settlement to state bar authorities for potential violations of legal ethics rules.

The settlement had faced considerable bipartisan criticism, with lawmakers questioning the legality and purpose of the fund. Democrats initiated a vote on the settlement fund as part of a broader legislative process.

While the administration had already moved away from the fund, the judge's voiding of the settlement underscores concerns about the integrity of legal processes and the potential for conflicts of interest when government entities engage in litigation with the executive branch.