The federal government shut down at the stroke of midnight Friday, halting all but the most essential operations and marring the one-year anniversary of President Donald Trump’s inauguration in a striking display of Washington dysfunction.

Last-minute negotiations crumbled as Senate Democrats blocked a four-week stopgap extension in a late-night vote, causing the fourth government shutdown in a quarter century. The slide toward closure lacked for high drama: The Senate vote was all but predetermined, and since the shutdown began at the start of a weekend, many of the immediate effects will be muted for most Americans.

Still, it comes with no shortage of embarrassment for the president and political risk for both parties, as they wager that voters will punish the other at the ballot box in November.

Social Security and most other safety net programs are unaffected by the lapse in federal spending authority. Critical government functions will continue, with uniformed service members, health inspectors and law enforcement officers set to work without pay. But if no deal is brokered before Monday, hundreds of thousands of federal employees will be furloughed.

After hours of closed-door meetings and phone calls, the Senate scheduled its late-night vote on a House-passed plan. It gained 50 votes to proceed to 48 against, but 60 were needed to break a Democratic filibuster. A handful of red-state Democrats crossing the aisle to support the measure, rather than take the politically-risky vote. Four Republicans voted in opposition.

In an unusual move, Senate Majority Leader Mitch McConnell allowed the roll call to exceed 90 minutes — instead of the usual 20 or so — seemingly accommodating the numerous discussions among leaders and other lawmakers. Still as midnight passed and the calendar turned, there was no obvious off-ramp to the political stalemate. Each party expressed resolve in its position — and confidence that the other would suffer the wrath of voters.

Even before the vote, Trump was pessimistic, tweeting, “Not looking good” and blaming the Democrats who he said actually wanted the shutdown “to help diminish the success” of the tax bill he and fellow Republicans pushed through last month.

Democrats balked on the measure in an effort to pressure on the White House to cut a deal to protect “dreamer” immigrants — who were brought to the country as children and are now here illegally — before their legal protection runs out in March.

The president watched the results from the White House residence, dialing up allies and affirming his belief that Democrats would take the blame for the shutdown, said a person familiar with his conversations but not authorized to discuss them publicly.

Predictably, both parties moved swiftly to blame one another. Democrats laid fault with Republicans, who control both chambers of Congress and the White House and have struggled with building internal consensus. Republicans declared Democrats responsible, after they declined to provide the votes needed to overcome a filibuster in the Senate over their desire to force the passage of legislation to protect some 700,000 younger immigrants from deportation.

Republicans branded the confrontation a “Schumer shutdown” and argued that Democrats were harming fellow Americans to protect “illegal immigrants.”

Trump had brought Senate Democratic leader Chuck Schumer to the White House Friday afternoon in hopes of cutting a deal. But the two New Yorkers, who pride themselves on their negotiating abilities, emerged without an agreement, and Republicans and Democrats in Congress continued to pass off responsibility.

“We made some progress, but we still have a good number of disagreements,” Schumer said upon returning to Capitol Hill. Budget Director Mick Mulvaney told CNN that “Not much has changed” over the course of the day, but he predicted a deal would be reached by Monday, when most government offices are to reopen after the weekend.

Democrats in the Senate had served notice they would filibuster the government-wide funding bill that cleared the House Thursday evening. They were seeking an even shorter extension that they think would keep the pressure on the White House to cut a deal to protect the “dreamer” immigrants.

Trump first described his discussion with Schumer as an “excellent preliminary meeting,” tweeting that lawmakers were “making progress – four week extension would be best!” But that optimism faded as the evening wore on.

Senate GOP leader John Cornyn of Texas said Trump told Schumer to work things out with McConnell and House Speaker Paul Ryan. McConnell did not attend the meeting because he was not invited, a Senate GOP aide said.

Trump had been an unreliable negotiator in the weeks leading up to the showdown. Earlier this week he tweeted opposition to the four-week plan, forcing the White House to later affirm his support. He expressed openness to extending the Deferred Action for Childhood Arrivals program, only to reject a bipartisan proposal. His disparaging remarks about African and Haitian immigrants last week helped derail further negotiations.

Trump had been set to leave Friday afternoon to attend a fundraiser at his Palm Beach, Florida, estate marking the one-year anniversary of his inauguration but delayed his travel.

“I think the president’s been very clear: he’s not leaving until this is finished,” Mulvaney told reporters.

As word of the Schumer meeting spread, the White House hastened to reassure Republican congressional leaders that Trump would not make any major policy concessions, said a person familiar with the conversations but not authorized to be quoted by name.

On Capitol Hill, McConnell said Americans at home would be watching to see “which senators make the patriotic decision” and which “vote to shove aside veterans, military families and vulnerable children to hold the entire country hostage… until we pass an immigration bill.”

Across the Capitol, the House backed away from a plan to adjourn for a one-week recess, meaning the GOP-controlled chamber could wait for a last-minute compromise that would require a new vote. But it wasn’t coming Friday night.

“We can’t keep kicking the can down the road,” said Schumer, insisting on more urgency in talks on immigration. “In another month, we’ll be right back here, at this moment, with the same web of problems at our feet, in no better position to solve them.”

The four-week measure would have been the fourth stopgap spending bill since the current budget year started in October. A pile of unfinished Capitol Hill business has been on hold, first as Republicans ironed out last fall’s tax bill and now as Democrats insist on progress on immigration. Talks on a budget deal to ease tight spending limits on both the Pentagon and domestic agencies are on hold, as is progress on a huge $80 billion-plus disaster aid bill.

Before Thursday night’s House approval, GOP leaders sweetened the stopgap measure with legislation to extend for six years a popular health care program for children from low-income families and two-year delays in unpopular “Obamacare” taxes on medical devices and generous employer-provided health plans.

A shutdown would be the first since 2013, when tea party Republicans — in a strategy not unlike the one Schumer is employing now — sought to use a must-pass funding bill to try to force then-President Barack Obama to delay implementation of his marquee health care law. At the time, Trump told Fox & Friends that the ultimate blame for a shutdown lies at the top. “I really think the pressure is on the president,” he said.

Arguing that Trump’s predecessors “weaponized” that shutdown, Mulvaney said Friday the budget office would direct agencies to work to mitigate the impact this time. That position is a striking role-reversal for the conservative former congressman, who was one of the architects of the 2013 shutdown over the Affordable Care Act.

With no agreement by midnight, the government would begin immediately locking its doors. The impact would initially be spotty — since most agencies would be closed until Monday — but each party would be gambling the public would blame the other.

In the event of a shutdown, food inspections, federal law enforcement, airport security checks, and other vital services would continue, as would Social Security, other federal benefit programs and military operations.