Yet Trump also undermined his own case for the national emergency, effectively saying the declaration was all about political expediency.

“I can do the wall over a longer period of time. I didn’t need to do this. I would rather do it much faster,” the president said, an astonishing acknowledgment that could come back to haunt him in court.

Read: What the president could do if he declares a national emergency

It was one of the least coherent appearances Trump has made in a presidency noted for its incoherence. Yet the circus in the Rose Garden threatened to distract from a major policy announcement.

During a briefing Friday morning, acting White House Chief of Staff Mick Mulvaney said that Trump would take $600 million from a Treasury Department forfeiture fund, $2.5 billion from a Defense Department counter-drug fund, and another $3.6 billion from Pentagon military-construction money. Only the construction funds require an emergency declaration. Trump will not take money from disaster-relief funds, an idea that had been discussed.

The move is sure to draw legal challenges, and might not take effect exactly as Trump described. But the fact remains that the president has declared a national emergency in order to save face with anti-immigration members of the conservative media and his base, having been roundly defeated in a joust with Congress over funding. In essence, the president has created a new crisis to get himself out of a previous crisis—which he also created. And the timing of Trump’s announcement, after months of equivocating and congressional debate, hardly supports the idea of an acute crisis.

There is an irony to Trump’s declaration. Prior to being elected, Trump aggressively criticized then-President Barack Obama, saying that he could be impeached for using executive orders to change immigration policies.

“Now he has to use executive action and this is a very, very dangerous thing that should be overwritten easily by the Supreme Court,” Trump said in 2014. The following year, Trump said, “The whole concept of executive order—it’s not the way the country is supposed to be run. He’s supposed to go through Congress and make a deal and go and talk to people and get the guys in there and, you know, whether you’re Republican or Democrat, is supposed to all get together. He’s supposed to make a deal, but he couldn’t make a deal, because it’s not his thing.” During the presidential campaign, Trump promised to withdraw Obama’s executive orders and accused him of abuses. Since becoming president, however, Trump has become a prolific user of executive orders.

Yet by declaring a national emergency, Trump is doing something more aggressive still. There is nuance to the situation: As the White House points out, Trump is using powers granted to him under a law passed by Congress in 1976, and not creating powers out of thin air. But it’s not clear that this situation fits within the letter of the law, and it’s all but impossible to say that it follows the spirit of the law.