A federal court in Texas issued a nationwide injunction late on Tuesday preventing the Trump administration from using $3.6 billion in military construction funds to erect a wall along the southern border, ruling that an emergency proclamation that enabled the government to access the funds was unlawful.

Judge David Briones of Federal District Court in El Paso said that the president’s proclamation, issued in January, violated congressional restrictions that limited funding for border-wall construction to $1.375 billion.

The latest ruling turns on a different issue than an earlier injunction, issued by a federal judge in California. The United States Supreme Court stayed that injunction, allowing the administration to begin using a separate package of $2.5 billion in Pentagon money for the construction.

“Today’s order affirms that the president cannot use a national emergency declaration to usurp Congress’s power of the purse,” said Kristy Parker, a counsel for Protect Democracy who represented the plaintiffs in the case, the Texas county of El Paso and the Border Network for Human Rights, an advocacy organization.