President Trump’s multi-billion-dollar plan for a wall to stop migrants on the U.S.-Mexico border has hit another judicial roadblock.

This one was erected Tuesday by a federal judge in El Paso TX, who ruled that the president and his administration don’t have the authority to divert $3.6 billion in funds from 127 military construction projects to the border barrier, despite Trump’s national emergency proclamation.

Judge David Briones ruled that “the president’s proclamation, issued in January, violated congressional restrictions that limited funding for border-wall construction to $1.375 billion,” reports the New York Times. That’s less than a quarter of the amount Trump sought from Congress last year,

“It is prohibiting the use of the military funds that were illegally diverted by the president’s declaration,” Fernando Garcia, executive director of the Border Network for Human Rights, told the El Paso Times. The immigrant-rights group, joined by El Paso County, sued President Trump over the wall funding earlier this year.

“Today’s order affirms that the president cannot use a national emergency declaration to usurp Congress’s power of the purse,” Kristy Parker, a counsel for Protect Democracy who represented the plaintiffs in the case, told the New York Times.

“The ruling marked the first instance of a local jurisdiction successfully suing to block construction of Trump’s border barrier,” says the Washington Post.

Last month, Judge Briones, who was appointed by President Bill Clinton, placed “a temporary hold on Trump’s plan to use the funds, but that decision did not have a nationwide scope,” the Post says.

In the new ruling, Briones wrote that the president’s attempt to divert military construction funds by emergency proclamation was unlawful — and therefore “the plaintiffs in the case were entitled to a permanent injunction halting the government.”

The new order does not affect funds appropriated by Congress for the wall, including 46 miles of new border fencing currently under construction in New Mexico.

In any event, Tuesday’s ruling does not end the long-running fight over the wall. The Justice Department says it will appeal.