Construction vehicles block the entrance to part of Death Valley National Park.Jane Ross / Reuters

Saturday marks the 22nd day of the government shutdown, the longest closure in American history. And with neither Democrats nor the White House budging from their positions, and the president threatening to keep the government closed for months or years, there’s no end in sight.

Which is all the more remarkable in light of how the shutdown began—or rather how it almost didn’t. As the nation approached the end of government funding in late December, President Donald Trump was on the verge of giving in. Then he reversed course, announced he’d shut down the government, and hasn’t blinked since. Why has Trump decided to hold firm this time, and what does it mean for the likelihood of a deal?

The proximate cause for his decision to shut the government down is relatively clear: firm pressure from his hard-line allies. In early December, during a meeting with the Democratic congressional leaders Nancy Pelosi and Chuck Schumer, Trump said that he would be “proud to shut down the government for border security.” But for 10 days afterward, the White House tried to slowly walk that back. Aides said that Trump was looking for ways to build the wall using funds from other departments, and they signaled that he’d sign a clean bill that kept the lights on without money for the wall. On December 19, immigration hard-liners mounted a counterattack.

“This is textbook,” Rush Limbaugh fumed. “It’s a textbook example of what the Drive-By Media calls compromise. Trump gets nothing and the Democrats get everything, including control of the House in a few short weeks.”

Ann Coulter blasted the president as “gutless” (earning herself a Twitter unfollow). Even Laura Ingraham was critical. “It was supposed to be a ‘big beautiful wall’ with a ‘big beautiful door,’” she tweeted. “Now it’s just an open door with no frame. Unreal.” Representative Mark Meadows, the chair of the conservative House Freedom Caucus, held out hope that Trump might still veto the bill. Followed by what? “Renegotiating.”

Even though there was no clear plan for how Trump would get money out of the new Democratic House majority once it took office in early January, the pushback got his attention, and he announced that he wouldn’t sign any legislation without wall funding. Positions have been stuck since then. Democrats have not shown any weakened resolve; neither has Trump.

On the Democratic side, the X factor seems to be Pelosi and her newly empowered caucus. Schumer has been inclined to negotiate with Trump in the past, but the House Dems, having campaigned against the president and his wall, show no appetite for compromise.

What’s less clear is why this is the moment Trump has decided to take a stand. Though he styled himself a master dealmaker in the business world, he’s been far softer in politics, showing a surprisingly deferential side at the negotiation table, whether his interlocutor is domestic or foreign. He backed down after promising to go after the National Rifle Association on gun control; he shied away from branding China a currency manipulator; he didn’t follow through on threats to investigate the Justice Department or withdraw foreign aid as retaliation for UN votes.

The timing is also peculiar. Trump’s best opportunity to get funding was when Republicans controlled both houses of Congress, during the first two years of his term. But Congress refused, and while Trump griped about it, he never pushed the issue as far as a shutdown. As my colleague Peter Beinart has written, the president shows little interest in actually building the wall. Instead, he appears to view it as an effective political bludgeon against Democrats.

Whether it actually is effective is unclear. Polling since the start of the shutdown has shown that more Americans blame Trump than Democrats for the deadlock, though Democrats haven’t escaped blame altogether. But a Morning Consult poll this week showed a four-point increase in the share of voters who see Trump as the culprit. Even if Trump is losing, there’s no massive shift against him that polls are picking up, and both sides seem to believe that they are winning.

Some Senate Republicans, however, may not be so certain. A small but growing number, especially those up for reelection in 2020, have begun saying that the government should reopen while negotiations over the wall continue—which is tantamount to surrender, since Trump would be giving up his leverage. (A few House Democratic freshmen are nervous as well.)

None of this offers much insight into the way the impasse might break. The negotiation tactics that Trump imported from the private sector have, yet again, failed to deliver much in the way of results in politics. During a meeting this week, Trump walked out after Democrats once again said they wouldn’t compromise on the wall. (It’s a sign of how poorly the talks are going that the two sides promptly got into a quarrel over whether Trump had stormed out or merely politely departed.) Trump’s allies claim that this tactic worked well in his last job, but Democrats seem only to have been delighted by the incident, which demonstrated their resolve.

By the end of the week, it seemed that the most likely outcome was for Trump to sidestep the shutdown by declaring a national emergency and using those extraordinary powers to build the wall, perhaps with the help of the military. While that would open up a new front of legal and political crisis as he tested the limits of presidential powers, it would also likely end the shutdown, as it would obviate the need for Congress to grant funding.

“If this doesn’t work out, I probably will do it, maybe definitely,” Trump said Thursday while visiting the border. But Friday afternoon, Trump demurred. “What we’re not looking to do right now is national emergency,” he said.

Once again, Trump had signaled one intention and then swerved at the last minute, a mirror image of his reversal on the shutdown in December. With negotiations frozen and the president ruling out a national emergency—at least for now—the shutdown that almost didn’t happen looks like it’s here to stay.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.