Mexico refused to pay for it. Congress wouldn’t shell out, either. So President Donald Trump capped a two-month battle over his border wall by deciding to go it alone.

President Trump said Friday that he will declare a national emergency in a bid to construct the wall, as Congress sends him a spending bill that included only a fraction of the money he wanted for its construction.

“We’re going to be signing today, and registering, [a] national emergency,” Trump said in a statement at the White House Rose Garden. “And it’s a great thing to do, because we have an invasion of gangs, an invasion of drugs, and an invasion of people.”

The unprecedented move allows Trump to signal to supporters that he’s still fighting to deliver the wall, while also sidestepping a second politically damaging shutdown just weeks after a standoff that shuttered the government for 35 days, cost the economy some $11 billion and briefly dented the President’s approval ratings. But the risky maneuver opens a Pandora’s box of future challenges, both in the courts and in Congress. And Republicans fear it raises the prospect of a future Democratic President wielding national emergencies as a tool to bypass Congress on liberal political priorities like climate change and gun restrictions.

“The precedent that the President is setting here is something that should be met with great unease and dismay by the Republicans,” House Speaker Nancy Pelosi told reporters Thursday after Senate Majority Leader Mitch McConnell announced Trump’s intentions. She went on to bash Trump for mounting an “an end run” around Congress’s power of the purse.

Pelosi’s comments came exactly a year after the massacre at Marjory Stoneman Douglas High School in Parkland, Fla., which killed 17 students and staff. And the Speaker used the grim anniversary to make explicit her threat. A “Democratic President can declare emergencies as well,” Pelosi said. “If the President can declare an emergency on something that he has created as an emergency, an illusion that he wants to convey, just think of what a President with different values can present to the American people.”

The decision took even some senior White House aides by surprise. Minutes before McConnell’s announcement, one White House official told TIME that Trump had not made up his mind and aides were still reviewing the 1,100 pages of legislation before the Senate.

Before the Senate voted 83-16 to pass that bipartisan spending bill, McConnell said Thursday he would support Trump’s emergency declaration. That position was a reversal for McConnell, who like other Republican lawmakers had previously expressed concerns that an emergency declaration would be an overreach upon which a future Democratic president could capitalize.

Republicans at the Capitol have spent recent days in a state of constant uncertainty. The crisis of Trump’s own creation has left even the most strident presidential apologists exasperated, prompting GOP Sen. Chuck Grassley of Iowa to make an unusual addendum to the chamber’s morning prayers: “Let’s all pray that the President will have wisdom to sign the bill so the government doesn’t shut down.”

Some senior Republicans were reluctant to publicly endorse Trump’s use of emergency powers to reprogram dollars Congress had intended for other purposes. Others noted polling data showing the last shutdown was a political loser for the GOP. Senior Republican Senate aides described the mood as filled with “quiet fury.”

“I think it’s a mistake on the president’s part,” said Republican Sen. Susan Collins of Maine, adding that National Emergencies Act applies to natural disasters or other catastrophic events. “For the President to repurpose billions of dollars that Congress has appropriated for other purposes that he has previously signed into law,” Collins added, “strikes me as undermining the appropriations process, the role of Congress, and of being of dubious constitutionality.”

As of Thursday evening, other GOP lawmakers were reserving judgment. West Virginia Sen. Shelley Moore Capito supports Trump’s move but said she was “concerned” about the precedent it could set and wanted to see “what he does and when he does it.” Still other lawmakers suggested to McConnell that he go along with Trump’s invocation of an emergency, because it faces an almost guaranteed challenge from Democrats.

Reversing the emergency declaration requires a simple majority in both the House and Senate. A Democratic leadership aide said a challenge is likely. But Pelosi’s office was waiting to see the details of the declaration before filing a resolution rejecting the action, which is likely to sail through the Democratic-controlled chamber.

Senate Republicans, who hold 53 of 100 seats, have previously warned Trump that he did not have 51 votes there either. If Senate Democrats vote against the emergency declaration in unison, it would only take four Republican defections to reject Trump’s move. On Thursday, more than double that number of GOP Senators opposed the spending bill. And due to Senate rules, McConnell would be powerless to prevent the resolution from coming to the floor. (If Trump declined to sign the resolution, a two-thirds majority in each House would be required to override him.)

Democrats are also eyeing legal challenges to the President’s authority to declare the border a national emergency. Those legal challenges will likely point to the fact that the Constitution gives the legislative branch the power of the purse. Legal experts argue that a 1953 Supreme Court case, Youngstown v. Sawyer, precludes the President from declaring an emergency to build a wall. In that case, the Court found President Harry Truman overstepped his authority when he attempted to nationalize steel mills in order to feed the Korean War machine.

But whether or not the White House ultimately prevails, the lawsuits will trigger a prolonged court battle that could halt construction efforts. And in the meantime, the President will be boasting to his supporters about everything he’s doing to deliver what he promised.

— With reporting from W.J. Hennigan and Alana Abramson from Washington



Write to Philip Elliott at philip.elliott@time.com.