The Army Corps of Engineers has halted construction on about 175 miles of border wall after a federal judge last week issued an injunction on $3.6 billion in military construction funds the Pentagon had diverted to help put up barriers on the U.S.-Mexico border, a spokeswoman for the Army Corps of Engineers confirmed to Military Times.

The Pentagon had spent more than half a billion of the funding on four contracts for about 70 miles of that plan, according to Army data.

“Because ... the balance of the equities and public interest weigh in their favor, they are entitled to a permanent injunction against defendants’ use of [military construction] funds for border barrier protection,” Judge David Briones wrote in his decision for El Paso County v. Trump.

Briones explained that President Donald Trump’s declaration of a national emergency at the border, which Briones invalidated in a separate October decision, cannot override a congressionally approved federal budget, which set aside that $3.6 billion for needed military construction projects, 127 in all.

“The U.S. Army Corps of Engineers will follow the two district courts’ rulings, which issued nationwide injunctions or stop work, for the [milcon]-funded border barrier construction program,” spokeswoman Raini Brunson told Military Times.

The ruling does not affect another $2.5 billion in Pentagon funding, from a counter-drug operations account, that is still free to fund 129 miles of barrier construction, Brunson added, as well as $3.7 billion from the Homeland Security Department.

Pentagon officials have said that weak protection from an influx of migrants at the border has required troops to deploy south since late last year, but that as construction continues, there will be less need for service members to help with surveillance and detention.

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

“So anywhere you’ve now stopped the flow coming across, where we’ve committed both detection and monitoring personnel and border police, we no longer have to commit the same number of personnel,” Lt. Gen. Andrew Poppas, director of operations for the Joint Staff, told reporters in September.

In the meantime, that month, Defense Secretary Mark Esper authorized up to 5,500 troops on the border at any given time. As of early December, there were about 5,000 deployed, an almost even split of National Guard and active duty troops.

Border wall funding has been holding up a defense authorization act and 2020 federal budget, as Democratic and Republican lawmakers push back and forth over whether and how to fund it.

“Declare victory, OK? You managed to get $7.5 billion for the wall, and I’m told ... they can’t spend that $7.5 billion before the end of [fiscal year 2020],” House Armed Services Committee chairman Rep. Adam Smith, D-Wash., told an audience in December.