For President Donald Trump, this weekend was supposed to be a celebration.
On the first anniversary of his presidency on Saturday, with the stock market roaring and his poll ratings finally rising, he had planned to rest at his Mar-a-Lago estate in Florida, feted by friends and admirers.
Instead, Trump stayed in Washington after he was unable to avert a government shutdown.
His failure to win passage by the U.S. Congress of a stopgap bill to maintain funding for the federal government further damaged his self-crafted image as a dealmaker who would repair the broken culture in Washington.
Even as the White House began pointing the finger at Democrats, the Republican president came under fire.
"It's almost like you were rooting for a shutdown," Senate Democratic leader Chuck Schumer said of Trump on Saturday.
Trump, who in July 2016 said: "Nobody knows the system better than me, which is why I alone can fix it," has asserted that past government shutdowns were the fault of the person in the White House.
In a "Fox & Friends" interview after a 2013 shutdown, he said then-President Barack Obama was ultimately responsible.
"The problems start from the top and have to get solved from the top," Trump said. "The president is the leader, and he’s got to get everybody in a room and he’s got to lead."
As this new shutdown, the first since 2013, looked increasingly likely on Friday, Trump made a last-ditch effort to behave as the kind of problem-solver he has long claimed to be.
First, he postponed a long-planned weekend trip to his winter home Mar-a-Lago, where a lavish $100,000-a-couple fundraiser on Saturday would extol his first year in office.
He had little choice. Critics would have hammered him for attending such an event while government workers were being put on leave and many government services curtailed.
Then Trump called Schumer, and, after a positive conversation, invited him to a meeting at the White House. It was intimate - just the president, Schumer and top aides. Republican leaders were excluded. The idea was to find some common ground. It lasted 90 minutes.
One person familiar with the events said the two men agreed to seek a grand deal in which Democrats would win protections from deportation for some 700,000 young undocumented immigrants known as "Dreamers" and Trump would get more money for a border wall and tighter security to stem illegal immigration from Mexico.
By early evening, however, that plan was dead. The source said Trump had spoken in the meantime with conservative Republicans and been hit with their objections to the deal with Schumer.
"He did not press his party to accept it," Schumer said later.
The day seemed part of a familiar pattern that has driven Democrats to distraction. Trump courts their support and suggests flexibility, only to pivot and side with more conservative lawmakers.
It happened in September, after he cut a short-term government funding deal with Schumer and House Democratic leader Nancy Pelosi.
Weeks later, when Schumer and Pelosi thought they had reached an agreement to preserve a program that protected Dreamers, congressional sources said Trump walked away.
That stand-off lasted until earlier this month, when Republican Senator Lindsey Graham and Democratic Senator Dick Durbin reached a bipartisan proposal on immigration.
They believed Trump had signaled he would support it. But in a heated Oval Office meeting, Trump savaged the deal.
A Democratic senator alleged that Trump said the United States needed to take fewer immigrants from Haiti and African nations, referring to them as "shithole countries". Trump denied using that language but the controversy poisoned negotiations.
Both sides felt betrayed, and Trump’s flip-flops left Republican Senate leader Mitch McConnell mystified to the point where he said earlier this week that he could not figure out Trump’s position on the issue.
Trust was further undermined when Trump appeared to criticize a House stopgap funding bill that the White House hours earlier said he supported.
Members of each party blamed the other for the shutdown, but some of the blame landed on the president.
"Donald Trump is not capable of carrying out this kind of an intricate conversation about issues," John Yarmuth, the senior Democrat on the House Budget Committee, told reporters.
"He doesn't have the attention span to do it. He doesn't have the interest to do it. All he wants to do is show he's engaged in the process."
(Reporting by James Oliphant and Richard Cowan; Editing by Damon Darlin, Kevin Drawbaugh and Janet Lawrence)