Donald Trump is facing a major setback in his ongoing plan to keep immigrants of color out of the United States. A federal judge on Tuesday (December 10) barred the Trump administration from diverting $3.6 billion in military funds to build a wall on the southern border, Reuters reports. 

U.S. District Judge David Briones of the western district of Texas issued the permanent injunction in a 21-page ruling. The decision is a blow to Trump, who has promised “to build at least 450 miles of wall along the southern border by November 2020,” according to Reuters. Judge Briones said it was unlawful for the administration to issue an emergency proclamation in February in order to divert billions of dollars from the Pentagon’s budget to help fund the border wall. 

Reuters reports the plaintiffs in the lawsuit, El Paso County and the Border Network for Human Rights, argued that the president “exceeded his authority” with the emergency proclamation. 

In a statement obtained by NPR, Kristy Parker, counsel for Protect Democracy, which represented the plaintiffs, said the judge’s ruling was validating. “The President’s emergency proclamation was a blatant attempt to grab power from Congress,” she said. “[Tuesday]’s order affirms that the President is not a king and that our courts are willing to check him when he oversteps his bounds.”

A representative for the U.S. Department of Justice said the Trump administration will appeal Judge Briones’ decision, according to Reuters.