Jose Luis Magana / AP

The federal government partially shut down on Friday evening, its second closure of the year, as congressional leaders and the White House began a new round of negotiations. The talks represent the final act of unified Republican control in Washington—and a bookend to showdowns of years past over federal spending and immigration.

With President Donald Trump dug in on funding for a southern border wall, a shutdown of the nine federal departments Congress hasn’t already funded for 2019 appeared inevitable for most of Friday. The Senate sat paralyzed for nearly five hours at one point, as Republicans were unable to muster the votes even to consider—let alone pass—a House spending package that included $5.7 billion in funding for the wall.

“We’re totally prepared for a very long shutdown,” Trump told reporters at the White House before the Senate had even finished voting. A prolonged lapse in funding will shutter national parks and museums over the holiday travel period and furlough hundreds of thousands of federal employees, forcing them to skip at least one paycheck over Christmas. (They will likely be paid retroactively whenever the government reopens.)

By 6 p.m. eastern time, hours before the midnight deadline, the best the Senate could do was to agree merely on the scope of 11th-hour negotiations, which would include leaders of both parties and the White House. The goal was a broad agreement that would fund most government agencies for all of 2019 while settling the dispute over border security that has driven the two parties apart.

“There is no path forward for the House bill,” Senator Jeff Flake of Arizona, the retiring Republican and Trump critic, declared on the Senate floor. “The only path forward is to a bill that has an agreement between the president and both houses of Congress. And the next time we vote will be on the agreement, not another test vote.”

Flake and another retiring Republican, Senator Bob Corker of Tennessee, had withheld their support from beginning debate on the bill the House passed, in a bid to jostle the leadership back to the bargaining table. The gambit worked—to a point.

It seemed clear by Friday evening that Congress would miss its deadline, ensuring at least a brief lapse in federal funding. But with talks reopened, it was possible that any shutdown would be short and have a limited impact.

If the negotiations break down again, however, it’s entirely possible that much of the government will remain closed for the rest of the year, until the new Congress convenes in January, with Democrats controlling the House majority.

This is the second government shutdown of the year, after funding lapsed for four days in January as the two parties fought over immigration. But while Democratic demands for a deal that protected Dreamers precipitated that shutdown, the blame for this one will fall squarely on Trump and his demand for a taxpayer-funded border wall.

Earlier in the week, the Senate unanimously approved a measure to keep the government running through February 8; Republicans supported the bill in part because they’d been told Trump was likely to sign it. But the president reversed course, instead heeding calls from hard-liners in the House Freedom Caucus and conservative media to dig in on the wall.

After Trump informed Speaker Paul Ryan in a White House meeting that he would not sign the Senate-passed bill, the retiring GOP leader, in one of his final acts as a member of Congress, bowed to the president’s wishes and added $5.7 billion in wall funding, along with $7.8 billion in disaster relief. The bill passed Thursday evening largely along party lines, as Republicans defied a prediction by House Minority Leader Nancy Pelosi that there were not enough votes for the wall in the House.

It was a pyrrhic victory for Republicans, however. The bill was doomed in the Senate from the moment it passed the House, as Democrats were united in providing enough votes to sustain a filibuster. On Friday, Trump made another futile bid to pressure Senate Majority Leader Mitch McConnell and Senate Republicans to deploy the so-called nuclear option and eliminate the legislative filibuster. But McConnell, as he has repeatedly before, reiterated that he didn’t have enough votes to change the rules.

When the measure came up in the Senate early Friday afternoon, not only did it not come close to the 60 votes it needed to advance, but it struggled to win the simple majority necessary to even begin debate. In a sign of how abruptly Trump changed course, McConnell had to hold the vote open for hours while he waited for senators to return to Washington; many had already gone home for the holidays on the belief that they had averted a shutdown.

By Friday night, both the House and Senate had returned, but lawmakers could only wait—and hope—for an agreement to vote on.

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