Acting US Defense Secretary Patrick Shanahan says he has yet to determine how much money the Pentagon should reallocate to finance President Donald Trump’s border wall — or whether it’s even necessary at all.

Shanahan has the unenviable task of charting out how to turn Trump’s border wall promise into a reality, after the president this week declared a national emergency in a maneuver to circumvent Congress. Trump agreed this week to lawmakers’ plan to allocate $1.375 billion to border security — a sum far lower than his $5.7 billion asking price, and even less than what was offered in previous deals. In turn, Trump says he can use his executive powers to redirect line items in the military budget to dredge up money for his wall.

Shanahan ultimately has final say on how the funds are reallocated, but first he’s required by law to decide whether the move is actually militarily necessary.

”I think I have a lot of discretion,” Shanahan told reporters while traveling abroad on Saturday. “You can trust the numbers in terms of the potential. Then you gotta marry it up with where the money would be spent.”

The White House has already laid out a general framework of how the funds would be redirected. About $600 million would come from the Treasury Forfeiture Fund, which is money seized from people suspected of crimes; $2.5 billion from the military’s narcotics funding, along with an additional $3.6 billion from the DOD construction accounts.

An unnamed military official told reporters over the weekend that Shanahan is expected to approve that final figure for construction funding for the wall. He’s taking the weekend before making any formal announcements.

”But I just want to make a point of this: we are following the law, using the rules, and we’re not bending the rules,” Shanahan said.

Trump is already fielding opposition left and right

The president has broad leeway to make emergency declarations — several past presidents have done so in recent history, including George W. Bush after the 9/11 terror attacks, and Barack Obama during the 2009 swine flu outbreak. The Trump administration and those previous presidents have banked on the National Emergencies Act of 1976 to back them up when redirecting federal funds.

But it was always expected that there would be a legal battle challenging Trump’s authority to circumvent Congress’s power of the purse for a situation that questionably qualifies as an emergency. Trump says there’s a crisis at the US-Mexico border that justifies his move, but even he believes that declaring a national emergency wasn’t his only option.

This quote should be the first sentence of the first paragraph of every complaint filed this afternoon. https://t.co/ClHQhpTaEe — George Conway (@gtconway3d) February 15, 2019

States and liberal activists groups have already begun burying the administration in lawsuits. El Paso County teamed up with three nonprofits to sue the Trump administration; the ACLU says the president’s national emergency claims are bogus; and the state of California has started to put its own legal challenge in motion.

Trump himself admitted from the outset that his maneuvers will likely trigger a winding legal battle that could ultimately end in the Supreme Court. But it’s not just the court system he needs to worry about.

House Democrats are expected to pass a resolution in coming weeks as a formal rebuke of the president’s use of his national emergency powers. They have the option of taking the administration to court as well. But a resolution vote could put a number of Republicans in the hot seat in having to say on record whether they approve of the president’s tactics to achieve his campaign promise of a border wall.

“I’m going to take a look at the case the president makes,” Sen. Ron Johnson (R-WI), chair of the Homeland Security Committee, told NBC host Chuck Todd Sunday on “Meet the Press.”

The senator said he was concerned about the timeline of when the administration actually intends to put the funds into use. “If he’s not going to be spending it this fiscal year or very early in the next fiscal year, I would have my doubts.”