Washington CNN  — 

A federal judge in Texas blocked the Trump administration from using billions of dollars in Pentagon funds for the construction of the border wall.

Judge David Briones of the US District Court for the Western District of Texas said Tuesday that the administration cannot use military construction funds to build additional barriers on the southern border.

The ruling is a setback for the administration, which has sought to shore up money for the President’s signature campaign promise of a border wall, and marks yet another high-profile blow the courts have dealt Trump of late on key issues, including his immigration policies and his fight to not turn his tax returns over to Congress. It targets only one set of Pentagon funds, however, leaving in place the money the Supreme Court allowed to be used earlier this year.

In September, Secretary of Defense Mark Esper authorized diverting of $3.6 billion in military construction funds for 11 wall projects on the southern border with Mexico. The Pentagon said at the time that half the money was coming from deferred projects overseas, and the other half was planned for projects in the US.

“DoD is evaluating the injunction right now, and will work with the Department of Justice on the next steps. DoD will comply with all court orders,” said Pentagon spokesman Lt. Col. Chris Mitchell in a statement.

The lawsuit, brought by El Paso County, Texas, and Border Network for Human Rights, argued that President Donald Trump overstepped his authority when he issued a national emergency declaration to gain access to additional funds for his border wall, despite receiving $1.375 billion from Congress.

The complaint also alleges that the declaration doesn’t meet the National Emergencies Act’s definition of “emergency” and pushes back against Trump’s remarks that border barriers led to a drop in crime in El Paso.

“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,” said Kristy Parker, counsel for Protect Democracy, a nonpartisan nonprofit which represented the plaintiffs, in a statement.

House Speaker Nancy Pelosi tied the ruling to others blocking the executive branch from going around Congress.

“Once again, the courts have resoundingly ruled against the President’s attempt to negate our system of separation of powers, which is the genius of our Constitution, by assaulting Congress’s exclusive constitutional power of the purse,” Pelosi said in a statement. “Despite what the President may think, Article II does not mean that he can ‘do whatever he wants.’”

At issue is the military construction funds that have been diverted to build a border wall. In October, Briones found that the plaintiffs had standing to bring the case because of they’ve suffered harm as a result.

The ruling doesn’t apply to the use of other funds for the wall, including counter-drug and Treasury Forfeiture Funds, that have been designated for wall construction.

CNN’s Ryan Browne contributed to this report.