President Donald Trump on Friday planned to sign a bill to fund the government hours before it was scheduled to shutdown for the second time in as many months.

But that’s not all.

Not content with final deal, Trump announced at a Rose Garden ceremony that he would declare a national emergency in an effort to syphon money from other parts of the government to fund a wall along the southern border. Trump has demanded $5.7 billion for a border wall, but the deal passed by Congress on Thursday allocated just $1.375 billion to build 55 miles of fencing.

“So I'm going to be signing a national emergency and it's been signed many times before. It's been signed by other presidents from 1977, so it gave the president the power there's rarely been a problem,” Trump said. “They signed it nobody cares, I guess they weren’t very exciting. But nobody cares, they signed it for far less important things in some cases, in many cases. We're talking about an invasion of our country with drugs with human traffickers.”

Trump’s invocation of the National Emergencies Act of 1976 to direct funds for the wall’s construction is an attempt to bypass a legislative logjam that caused the longest government shutdown in American history.

But it is also a legally untested and historically unprecedented constitutional end run around the powers of the purse granted to Congress. The emergency powers granted to Trump under the law give the president wide discretion once an emergency has been formally declared, including the ability to divert taxpayer dollars “during the period of a national emergency.” The purported emergency in this case is the flow of undocumented immigrants into the United States—a flow that has been largely declining.

On Friday morning, the White House briefed reporters on the “pots” of money that it plans to repurpose for wall construction. Altogether, acting White House chief of staff Mick Mulvaney said the administration has identified about $8 billion in funding—including the money appropriated by Congress this week—to fund that 234 miles of border wall.

The bulk of the reprogrammed funds will come from the Defense Department, Mulvaney said, including $3.6 billion from the Pentagon’s military construction account, and $2.5 billion designated for counternarcotics activities. The administration will also draw $600 million from a Treasury Department asset forfeiture account.

“We assess that with the $8 billion we will have sufficient money,” to finance the president’s wall construction plans, Mulvaney said

Mulvaney and Russ Vought, the acting director of the White House Office of Management and Budget, pushed back on suggestions by Democrats and Republicans that the president’s emergency declaration will create a new precedent for future White House occupants. Democratic lawmakers have suggested that a future Democratic president could, for instance, declare a national emergency in an effort to impose new gun control measures or to push forward a sweeping climate change agenda.

“That’s completely false,” Mulvaney insisted. “If Democrats could figure out a way to do that they would’ve done that already.” The president’s emergency declaration, he claimed, “creates zero precedent. This is authority given to the president in law already.”

Officials on the call nonetheless declined to go into more detail about the legality of the president’s declaration, and how the administration plans to defend it against court challenges that are already materializing. Nor have those details gone to Capitol Hill offices with direct oversight of the wall construction. According to a House Armed Services Committee spokesperson, the committee had not been provided any information as of Friday morning.

For more than four decades, the National Emergencies Act has been used in concert with other emergency declaration legislation to appropriate funds during natural disasters, to invoke sanctions following international incidents, or to hasten government response to public health crises. Trump’s invocation of the act, however, is in explicit defiance of Congress’ refusal to appropriate funds for his proposed border wall, and amounts to a dramatic—and, according to constitutional experts, apparently legal—circumvention of legislative power .

“Because there’s no criteria for what counts as an emergency, then theoretically a president could use it for anything he thought, or she thought, was an emergency,” said Professor Kim Lane Scheppele, the Laurance S. Rockefeller Professor of Sociology and International Affairs at Princeton University’s Woodrow Wilson School. “There’s just no legal standard for that. It just says, whenever the president sees fit, basically, the president can declare an emergency.”

Already, members of Congress have said they will challenge the declaration, with Democratic leaders calling it a “a gross abuse of the power of the presidency.” House Judiciary Chairman Jerry Nadler (D-NY) told the Washington Post on Thursday that House Democrats plan to bring up a resolution of disapproval to push back against the president’s declaration. The Senate would be forced to take up the resolution, potentially creating an difficult situation for some Senate Republicans who tried to discourage the president from circumventing congressional authority.

Still, it is unclear whether lawmakers—or anyone—have legal standing to challenge the president’s authority to unilaterally declare a national state of emergency.

“If Trump declares an emergency and they start building a wall, the only way that a person gets standing is if they are personally injured” by the president’s actions, Scheppele told The Daily Beast. “If they seized anybody’s private property to build the wall along the border, the person would have standing to sue… but they’d only be challenging the wall, not the emergency declaration.”

There may be little legal recourse, Scheppele said, to address the core question of whether the president has improperly invoked emergency powers.

“It may not be a good idea for him to do it—it may be politically unwise, it may be sort of scary, but legally there isn’t really a test there that he’s violating,” said Scheppele. “The law runs out and politics is the only thing that constrains him.”

The notion that a declaration of national emergency might be made in bad faith, however, is legally untested, which means that scholars disagree on whether legal challenges to the declaration itself could succeed.

“If there were evidence that a president were declaring a national emergency in bad faith, which frankly might be in this case, courts might be willing to look behind it,” said Liza Goitein, co-director of the Brennan Center for Justice’s Liberty and National Security Program. “If there is a paper-thin rationale for the emergency, but still a rationale, that’s where it gets more difficult.”

With reporting by Jackie Kucinich