May 8 (UPI) -- The Department of Government Efficiency illegally canceled roughly $100 million in grants that Congress had approved the National Endowment for the Humanities to award, a judge ruled.

U.S. District Court Judge Colleen McMahon said Thursday in a 143-page decision that DOGE and the Trump administration had "no constitutional authority to block, amend, subvert or delay spending appropriations based on the president's own policy preferences," CBS News and The Washington Post reported.

DOGE used ChatGPT to revoke grants the NEH had already awarded that it thought were related to diversity, equity and inclusion programs the administration sought to rapidly eliminate throughout the federal government in 2025.

The NEH was one of 16 "small agencies" that President Donald Trump last May marked for elimination in his 2026 budget proposal, which the DOGE effort, as spearheaded by Elon Musk, had already started culling expenditures from.

"The termination of NEH grants challenged in this action was unlawful because it was undertaken in violation of the First Amendment, in violation of the equal protection component of the Fifth Amendment and without statutory authority," McMahon wrote in the decision.