The Capitol is seen at twilight as Congress and President Donald Trump fight over his demand that lawmakers fund a wall along the U.S.-Mexico border. (J. Scott Applewhite/AP)

President Trump has directed his Cabinet secretaries to search for any stray funds that could be repurposed for the construction of a wall along the Mexico border, conceding that Democrats have stymied his efforts in Congress.

But his new approach sets up more budget and political battles, as it’s very difficult to legally re­direct taxpayer money without Congress’s approval.

“If you do this without going through the proper reprogramming requests and getting all the proper approvals, you are breaking the law,” said Todd Harrison, director of defense budget analysis at the Center for Strategic and International Studies.

A similar assessment was shared by some Democrats and Republicans on Tuesday, but White House press secretary Sarah Sanders said lawyers were reviewing what was possible.

“That’s their entire job is determining whether or not something is legal, and we are looking to those individuals to find out those specific pots of money that can be used for that,” she said.

The rapidly changing approach reflects a scramble by Trump aides to deliver on one of his core campaign promises without much assistance from Congress. The White House hasn’t settled on a plan for funding a border wall, and Republicans haven’t devised a way to obtain even a small portion of the spending Trump has demanded.

This has led to complaints from supporters of new restrictions on immigration that the White House fumbled one of its top priorities and never had a plan for how to proceed.

Mark Krikorian, executive director of the Center for Immigration Studies, said Trump has repeatedly threatened to fight Democrats over border wall funding, only to back down at the last minute, which made it clear to Democrats that he would capitulate again.

“I think this really undermines the president’s credibility,” said Krikorian, whose think tank has broad influence inside the administration and favors tight restrictions on immigration. “Why didn’t he go to the mattresses the first time this became an issue?”

The Constitution requires Congress’s approval before money can be allocated and spent, which has made it difficult for Trump to secure money for a border wall.

One of Trump’s central campaign promises in 2016 was the construction of a wall along the U.S.-Mexico border, and he vowed he would force Mexico to pay for the entire project. Since becoming president, he has abandoned that call, saying instead that taxpayer money should be devoted to the project and threatening repeatedly to shut down the government if his demands weren’t met.

In a Twitter post last week, Trump suggested a pending trade deal with Canada and Mexico would somehow provide the money needed for a wall along the Mexico border, though his advisers have not explained how this would work. Sanders said Tuesday it would come from new revenue to the Treasury Department triggered by economic growth, but this would be very hard to measure with any precision, if at all.

Congress has passed several spending bills in the past year that did allow the administration to repair and rebuild existing portions of border walls and even add some new barriers, but these projects have fallen far short of the scope Trump sought during the campaign.

The Department of Homeland Security said the administration has already begun work on 14 miles of wall in the San Diego area and another 20 miles near Santa Teresa, N.M. But the U.S.-Mexico border stretches for about 2,000 miles.

In the run-up to last month’s midterm elections, Trump overstated the amount of progress the government has made in the past year in constructing barriers. He said he had already secured $3.2 billion for these projects, an inflated figure. And House Minority Leader Nancy Pelosi (D-Calif.), who is expected to be the chamber’s next speaker, has said she will not support funding to build additional barriers once Democrats take control of the House in January.

There have been varying estimates of the cost of a full or partial wall along the border, with many starting at around $25 billion. Trump last week said $5 billion would be an ample amount to make major progress creating a partial barrier that is sufficient to block immigrants from crossing into the United States.

On Tuesday, as it became clear Democrats would not approve even half that amount, Sanders said the White House would be satisfied with $1.6 billion in new appropriations from Congress and then find other ways to cover the remaining $3.4 billion. But a few hours later, Democrats said they had never agreed to spending even $1.6 billion for the construction of a new wall. Democrats have long said that money is for replacing existing walls and barriers, though the White House has said the money would be for new barriers.

The federal government is projected to spend more than $4 trillion this year, and the $5 billion sought by the White House for a border wall is about 0.1 percent of that. But even moving around that amount of money could be considered illegal without congressional approval.

“This is pretty tricky business,” said Elaine Kamarck, a former top Clinton White House official. She said agencies can occasionally move around smaller sums of money without congressional input, but never anywhere near the amount the Trump administration is trying to secure.

Congress has already passed a defense law to fund the military through the end of September, making it hard for lawmakers to siphon off any money that is already allocated for military programs. Funding for the Department of Homeland Security expires Friday at midnight, but Democrats are closely monitoring any new request for that agency to prevent it from being used for a wall.

“I think our appropriations process restricts the wall, so I don’t see how he does it legally,” Sen. Benjamin L. Cardin (D-Md.) said.

Sen. Lamar Alexander (R-Tenn.) said the White House could be looking for any money in other agencies that was specified to be used for “border security” but otherwise would come up short.

“If they have authority to deal with border security, they can spend the money,” he said. “If they don’t have congressional authority, they can’t.”

Comments from Sanders and a number of Republicans on Tuesday made clear that there wasn’t a concrete plan going forward and that multiple scenarios were being considered.

“We are looking at existing funding from other agencies right now,” Sanders said.

Jeff Stein contributed to this report.