A federal judge in New York has blocked a wave of grant cancellations carried out under the Trump administration's Department of Government Efficiency, ruling that the Elon Musk-backed initiative likely violated federal law after staff used ChatGPT and keyword searches tied to diversity, race and gender to help determine which projects would lose funding.

The ruling, issued Thursday by U.S. District Judge Colleen McMahon, marks one of the most significant legal setbacks yet for DOGE, the cost-cutting program established after Donald Trump returned to office in January 2025 and tasked Elon Musk with helping overhaul federal spending.

At the center of the dispute were cuts to grants overseen by the National Endowment for the Humanities, where DOGE staff reportedly used artificial intelligence tools and keyword filters to identify projects connected to diversity, equity and inclusion initiatives.

"There can be no serious dispute that the review process implemented by DOGE did not conform to, or even resemble, NEH's ordinary grant-review process," McMahon wrote in the decision cited by ABC News.

Court testimony from former DOGE staffers Justin Fox and Nate Cavanaugh revealed that terms including "DEI," "Equity," "Inclusion," "BIPAC," and "LGBTQ" were used during the review process. Testimony also indicated that ChatGPT assisted in evaluating which grants should be flagged for cancellation.

The ruling did not specify exactly how much authority artificial intelligence had over the final decisions. Agency leadership reportedly retained formal control over the grant terminations. Still, McMahon sharply criticized the broader process, arguing that the government appeared to treat protected identities and historical subjects as evidence of wasteful spending.

"Treating Black civil-rights history, Jewish testimony about the Holocaust, the oft-forgotten Asian American experience, the shameful treatment of the children of Native tribes, or the mere mention of a woman as a marker of lack of merit or wastefulness is not lawful," she wrote.

The judge expressed particular concern about grants involving Holocaust education and Jewish history.

"At a time when the specter of antisemitism has reemerged from the shadows, for our government to deem a project about Jewish women disfavored because it centered on Jewish cultures and female voices is deeply troubling," McMahon stated.

The controversy has intensified scrutiny surrounding DOGE itself, which has become one of the most polarizing initiatives of Trump's second term.

Supporters argue the program was created to aggressively shrink the federal bureaucracy and eliminate politically driven spending. Critics say the speed and method of the cuts reflected ideological targeting rather than legitimate budget review.

The depositions added to that debate. Fox and Cavanaugh, neither of whom had prior government experience before joining DOGE, defended the effort as necessary fiscal reform.

When questioned during sworn testimony about whether he regretted the impact of the grant cancellations, Cavanaugh responded: "No. I think it was more important to reduce the federal deficit from $2 trillion to close to zero."

Asked whether DOGE had actually achieved that objective, he answered: "No, we didn't."

The lawsuit was brought by several humanities and academic organizations, including the American Council of Learned Societies, the American Historical Association and the Modern Language Association.

Joy Connolly, president of the American Council of Learned Societies, said the ruling highlighted the broader role humanities funding plays in civic life.

"The humanities are not a luxury. They are how a democracy understands itself," Connolly stated.

The decision lands as the Trump administration continues its wider rollback of DEI-related initiatives across federal agencies. Since early 2025, departments throughout the government have suspended diversity programs, reassigned staff and reviewed grants connected to equity and inclusion policies.