ToplinePresident Donald Trump’s controversial settlement with the IRS was an unlawful effort to use the court system for his and his administration’s own benefit, a federal judge ruled Monday, nullifying the agreement while ordering sanctions in the case and referring the president’s attorneys for possible disciplinary action.President Donald Trump attends the 36th NATO Heads of State and Government Summit in Ankara, Turkiye on July 8.Anadolu via Getty ImagesKey FactsJudge Kathleen M. Williams voided Trump’s agreement with the IRS, which included a $1.776 billion “anti-weaponization fund” for the president’s allies and a sweeping immunity agreement shielding him, his sons and other “related parties” from some prosecution or civil action from the federal government.The IRS settlement was borne out of Trump’s lawsuit against the agency and came as Williams was in the process of determining whether the litigation could even move forward, as it was unclear whether Trump and the IRS he controls as president were actually “adverse” parties with opposing interests.Williams ruled Monday the parties weren’t actually in opposition to each other and the litigation and settlement aren’t lawful as a result, writing Trump “improperly” used the lawsuit “as a means of conferring legitimacy upon a course of action that they were unwilling to subject to judicial review.”The judge said the parties in the case are barred from referring to the “settlement agreement” or trying to use its provisions in any official proceedings, essentially voiding it, and ordered both monetary sanctions—paid to former federal judges who asked Williams to reopen the lawsuit—and non-monetary sanctions in the case.Williams referred Trump’s attorney Alejandro Brito to the Florida Bar for potential disciplinary action, and directed a copy of her order to be included as part of disciplinary proceedings that are already ongoing against Acting Attorney General Todd Blanche and Associate Attorney General Stanley Woodward.Trump's personal legal team did not comment directly on the ruling Monday, but criticized the IRS for failing to conceal the president's tax returns and said the president "continues to hold those who wrong America and Americans accountable."Crucial QuoteBy bringing his IRS lawsuit and settling the case, Trump was using the court “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,” Williams wrote Monday, concluding the plaintiffs in the case—Trump, his eldest sons and the Trump Organization, “acted in bad faith.”This story is breaking and will be updated.