A Pentagon decision to redirect up to $1 billion to build 57 miles of fencing along the Mexican border was slapped down Tuesday by a House panel that rejected the "reprogramming action."

Acting Defense Secretary Patrick Shanahan authorized the Army Corps of Engineers on Monday to plan and build the 18-foot-high fencing and to construct and upgrade roads and install lighting near the border in Yuma, Arizona, and El Paso, Texas.

Shanahan said the $1 billion plan was in support of the national emergency declaration President Donald Trump issued last month after Congress refused to appropriate the $5.7 billion he wanted for construction of a border wall.

"The committee denies this request," U.S. Rep. Adam Smith, D-Wash., chairman of the House Armed Services Committee, said in a letter to the Defense Department comptroller. "The committee does not approve the proposed use of Department of Defense funds to construct physical barriers and roads or install lighting in the vicinity of the United State border."

More:House fails to override President Trump's veto of national emergency resolution

Some Republicans also were skeptical. Texas Rep. Mac Thornberry said he opposes using defense funding for other purposes but suggested Shanahan faced “a lot of criticism for decisions that you had nothing to do with.”

Shanahan said he understood the concerns, but he was executing a “legal order from the commander in chief.”

It was not immediately clear what effect the committee’s decision would have on wall construction. The panel doesn’t have the legal authority to block the transfer, but it could make changes in the law to block any funding shifts in the future.

Trump has repeatedly claimed the wall is needed to keep criminals from entering the USA. Shanahan cited the need to "block drug-smuggling corridors across international boundaries of the United States in support of counter-narcotic activities of federal law enforcement agencies."

Shanahan, in testimony Tuesday before Smith's panel, reiterated his claim that the transfer of funds to the wall wouldn't jeopardize national security.

Shanahan announced the $1 billion plan late Monday. Several Democratic senators on the Appropriations Committee signed a letter blasting Shanahan for failing to seek approval from the congressional defense committees.

“We have serious concerns that the department has allowed political interference and pet projects to come ahead of many near-term, critical readiness issues," the letter said.

The Senate will not take up the measure since it failed in the House, according to the office of Senate Majority Leader Mitch McConnell of Kentucky.

Trump said his declaration of a national emergency to build the wall allows him to tap billions targeted for military construction projects ranging from garages to air traffic control towers. The projects have been approved by Congress, but contracts have not been signed.

Last week, Shanahan forwarded to Congress the list of construction projects the Pentagon could delay but not cancel to redirect funds to the wall.

Contributing: Tom Vanden Brook, USA TODAY; The Associated Press