The Pentagon’s announcement that it would reprogram $1 billion in Army funding to support the border wall was rejected Tuesday by the top Democrat on the House Armed Services Committee, setting up a possible fight over which branch of government has final authority on how that money can be spent.

On Monday night, Acting Defense Secretary Patrick Shanahan announced that he had authorized the U.S Army Corps of Engineers to spend up to $1 billion to support the Department of Homeland Security’s request “to build 57 miles of 18-foot-high pedestrian fencing, constructing and improving roads, and installing lighting within the Yuma and El Paso Sectors of the border.”

The reprogramming was directly in response to President Donald Trump’s declaration of a national emergency in February.

But in a statement released as Shanahan was testifying before the House Armed Services Committee to discuss DoD’s 2020 budget request, the chairman, Rep. Adam Smith, D-Wash., released a letter informing DoD it would not be allowed to do any such reprogramming.

“The committee denies this request,” Smith wrote. “The committee does not approve the proposed use of Department of Defense funds to construct additional barriers and roads or install lighting in the vicinity of the United States border.”

The denial sets the stage for a potential legal challenge, based on DoD’s reasoning for selecting the fund in the first place. The $1 billion was to be pulled from the Pentagon’s counterdrug account, which allows its use to construct some fencing and lighting, but may not support a full wall.

In prior discussions, defense officials have said this account was selected because they believed it could be used without getting reprogramming permission from Congress, due to the intended use of the funds.

× 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.

The denial, however, has set the stage for a much bigger fight, said Rick Berger, a defense research fellow at the American Enterprise Institute.

“This is really a constitutional issue … this is a core power of the purse issue,” Berger said.

Smith’s denial also came as he warned the Pentagon that its effort to reprogram money without getting the permission of the four defense committees in the House and Senate would result in it no longer having any reprogramming privileges at all.

To stop DoD’s use of the $1 billion now, Berger said the House would have to work with the Republican-controlled Senate and quickly pass specific legislation blocking that specific use. Given the pace and political reality of Congress, that’s unlikely, and DoD would have spent the funds before any such legislation could progress.

In reality, Berger said, "there’s nothing Congress can do to keep DoD from obligating and moving [the funds] to those 57 miles on the border,”

It’s more likely DoD’s overall reprogramming authority would be rescinded through a future debate — one that Republicans on the Senate side likely do not welcome, Berger said.

On one hand, the Senate needs to protect its power of the purse in future administrations. On the other, “it will be very, very interesting to see what Republicans will do on the Senate side, because they are pulled between the military and the wall.”

The last six months of military operations on the border have cost DoD $206 million — $131 million for approximately 2,000 National Guard forces and $75 million for 4,000 active-duty forces. The Pentagon did not have an accounting of the costs incurred in fiscal 2018 immediately available.

The Pentagon had assumed it would be able to move $2.5 billion from the counterdrug account and $3.6 billion from unobligated military construction funds to fund the wall and meet the demands set on it by the president’s emergency declaration. After much back-and-forth, the Pentagon released the list of military construction projects that could be delayed or cut last week.

Use of that money would require reprogramming approval from Congress, which could be hard to come by given the wide range of projects under the knife and the districts they impact. The projects impacted, for example, include a submarine pier in Smith’s district.