For weeks, Donald Trump had been scheduled to fly to Palm Beach on Friday to begin a two-week Christmas vacation at Mar-a-Lago, but those plans are in doubt as Washington hurtles toward a partial government shutdown after Trump insisted Thursday he would veto any spending bill that did not include billions of dollars for his border wall. Trump’s renewed veto threat capped a chaotic three-day period in which the president briefly gave up on the wall, enraging his base, and then walked back his walk-back in a head-spinning capitulation. “He’s over. He’s finished,” one Breitbart staffer told me. Inside the White House, some advisers fear he’s boxed himself in, with disastrous results in every direction. “He’s losing it,” one former West Wing official said. “He doesn’t know which way to turn.”

Trump started the crisis on December 11 when he declared, “I am proud to shut down the government for border security” during a televised meeting with Chuck Schumer and Nancy Pelosi. The remark thrilled his base, but ignored the facts on the ground: Trump’s shutdown threat, at a time when he’s weakened by a slumping stock market and Robert Mueller’s accelerating investigation, did not give him enough leverage to convert votes in Congress for the wall. “Trump said it, but then reality kicked in,” a former West Wing official said. “The ‘win the day’ on Fox strategy didn’t work,” a Republican close to Senate Majority Leader Mitch McConnell said. On Tuesday, the White House announced that Trump was essentially just kidding—he would sign a short-term funding bill that kept the government open through February.

The base revolted. On Wednesday, Ann Coulter told the Daily Caller that Trump was “a joke presidency who scammed the American people, amused the populists for a while, but he’ll have no legacy whatsoever.” On Fox, Sean Hannity and the Fox & Friends hosts lit into the decision. “Trump didn’t understand these are the people who stand on Fifth Avenue when he shoots the bullet,” the former West Wing official said. A third former West Wing official told me: “You can’t keep saying we’re going to build the wall, and Mexico is going to pay for it, but then not do it.” But some of Trump’s moderate advisers resented the attacks from the right. “His erstwhile critics wouldn’t be happy with anything short of a Great Wall of China on the southern border,” one senior West Wing official told me.

As his supporters turned on him, Trump took a self-pitying attitude. He complained to one friend that European leaders were doing much worse. “The world is melting down! Look at France. Those riots are costing them a billion dollars a day!” he said, according to a person briefed on the conversation. Trump told another friend that the only person in the White House who gets good press is Jared Kushner. In an apparent bid to change the narrative, Trump announced he was withdrawing the 2,000 United States troops in Syria, but that only compounded the crisis by spurring Defense Secretary Jim Mattis to resign. “It was some reverse wag-the-dog bullshit,” a Republican close to the White House told me.

Now, Trump has hours to negotiate his way out of one of the worst crises of his presidency. No matter what happens, allies fear the episode has revealed Trump’s inability to govern at a moment when Democrats are about to open political warfare on the White House. “They’re absolutely going to crush him. He has no idea what’s coming his way,” the Republican said.

The White House did not respond to a request for comment.