A federal judge dealt the White House a major blow Tuesday, ruling that the administration cannot use several billion in military funding to pay for border wall construction.

David Briones, who has served on the U.S. District Court for the Western District of Texas since his appointment by former President Bill Clinton in 1994, ruled Tuesday that the Trump administration cannot use billions in military funds to pay for physical barriers along the U.S.-Mexico wall.

“After due consideration, the Court is of the opinion that a declaratory judgment and permanent injunction shall be granted in Plaintiffs’ favor,” Briones wrote in the court ruling.

The decision regards a lawsuit brought by Border Network for Human Rights, an immigration-rights organization, and El Paso County, Texas. The plaintiffs argued that President Donald Trump overstepped his authority when he declared an emergency at the southern border earlier in 2019, allowing him to reallocate more funds for the border wall on top of the $1.375 billion Congress had just appropriated for construction at the time.

Border Network for Human Rights and El Paso County were represented by Protect Democracy, a progressive group that regularly litigates against the Trump administration.

“The president’s emergency proclamation was a blatant attempt to grab power from Congress. Today’s order affirms that the president is not a king and that our courts are willing to check him when he oversteps his bounds. This is a huge win for democracy and the rule of law,” said Kristy Parker, counsel for Protect Democracy.

The ruling would affect Secretary of Defense Mark Esper’s recent move to divert $3.6 billion in military construction funds to numerous projects across the U.S.-Mexico border. However, there are other funds of which the judge’s decision has not affected. The White House, like many other unfavorable court decisions in the past, is expected to appeal the ruling. (RELATED: ‘This Was No Secret’: ICE, DOJ Respond To Criticism Of Sting That Busted Students Committing Visa Fraud)

The Trump administration has completed about 83 miles of barricade along the southern border, but most of these sections have been the replacement of old, dilapidated walls with newer ones. The administration, spearheaded by Jared Kushner, is aiming to complete at least 400 miles by November 2020.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.