In public, Donald Trump is still talking (and tweeting) about an immigration compromise with Democrats to avert another government shutdown. Behind the scenes, however, the White House is reportedly finalizing plans for the president to declare a national emergency to build his border wall—suggesting either that Trump lacks confidence in Congress to cut a deal, or that he is operating in extremely bad faith.

Most likely, it’s a bit of both. On Tuesday, Trump summoned Acting Chief of Staff Mick Mulvaney, senior adviser Jared Kushner, and other administration officials to discuss the logistics of the emergency declaration, according to Politico. The administration has suggested it would prefer not to circumvent Congress, especially since doing so would almost certainly trigger a Constitutional challenge. But Trump’s demands for a wall effectively guarantee that lawmakers will fail to reach an agreement that can satisfy him before the government closes again on February 15.

In theory, Democrats have more leverage than ever after Trump caved to House Speaker Nancy Pelosi and temporarily reopened the government last week. While Democrats have said they are willing to compromise, Pelosi has also been insistent that a physical border wall is out of the question. On Wednesday, Democrats presented a border-security proposal with their opening bid for wall spending: zero.

But Trump, with the encouragement of his 2020 campaign manager, seems to believe he still has the upper hand. “If the committee of Republicans and Democrats now meeting on Border Security is not discussing or contemplating a Wall or Physical Barrier, they are Wasting their time!” he wrote Wednesday on Twitter. Presumably his threat to declare a national emergency is meant to serve as an incentive: if you don’t cough up some money for a wall, I’ll build it myself.

That might be preferable for Republicans anyway. The last shutdown—a punishing 35-day impasse that Americans largely blamed on the president—created chaos at airports, hurt government employees, and, most important, hurt the president’s polling. Mitch McConnell, one of Trump’s top allies on the Hill, has indicated he’d support a bill aimed at preventing future shutdowns, and has even called on a higher power in hopes that another can be avoided. “We’re praying for you,” the Senate Majority Leader told Republican members of the bipartisan negotiating team Wednesday. “Get this done.” If there is no deal to be made, a national emergency could give the party an exit ramp: sure, the courts might interfere, but Trump could say he did his best. Republicans would get to shift the blame, and pick up a new 2020 talking point, too.

Still, Trump’s flirtation with the nuclear option could be a headache down the road. Trump has promised his base a wall, but they are loath to trade away DACA or green cards or amnesty to get it. If he cuts a deal with Democrats, conservatives like Ann Coulter and Rush Limbaugh will rightly ask, couldn’t he have just ordered the military to build it? At the same time, Democrats must wonder why they should negotiate with somebody who is holding both the government and the Constitution hostage. Especially if an emergency declaration will simply be swatted down in court.

On Thursday, Trump warned again that he won’t hesitate to pull the trigger. “The Wall is getting done one way or the other!” he tweeted. But nothing is so simple. While Mulvaney, Kushner, and a fleet of White House lawyers are scrambling to build a legal justification for Trump to expand his emergency powers, Republicans on the Hill are wary of the precedent he might set. “It could be seen as subverting the Constitution for his own ego, and it will be the end of his presidency,” one former senior administration official told Politico. That doesn’t sound like a bad outcome for Nancy Pelosi, either.