Evan Vucci / AP

Updated on January 20 at 12:45 a.m. ET

Congress has shut down the federal government on the anniversary of President Trump’s inauguration.

Lawmakers missed a midnight deadline to keep the government open, as Senate Democrats and a group of Republicans blocked a House-passed bill that would have given the two parties more time to work out a long-term budget agreement and a deal to protect nearly 700,000 young immigrants at risk for deportation beginning in early March. The vote sent the government into a shutdown after negotiations between the president and Senate Minority Leader Charles Schumer had failed to yield a breakthrough in the impasse over immigration.

It wasn’t immediately clear how long the shutdown would last. The vote to keep the government open began shortly after 10 p.m. ET and extended past midnight. Groups of senators were huddled in the middle of the chamber apparently trying to come up with a last-minute agreement.

Shortly after the deadline passed, however, the vote ended, and the recriminations began. The White House issued an immediate statement blaming Democrats and Schumer in particular, vowing not to negotiate an immigration deal until Democrats agreed to reopen the government.

“Senate Democrats own the Schumer Shutdown,” Press Secretary Sarah Huckabee Sanders said. “Tonight, they put politics above our national security, military families, vulnerable children, and our country’s ability to serve all Americans. We will not negotiate the status of unlawful immigrants while Democrats hold our lawful citizens hostage over their reckless demands. This is the behavior of obstructionist losers, not legislators. When Democrats start paying our armed forces and first responders we will reopen negotiations on immigration reform. During this politically manufactured Schumer Shutdown, the president and his administration will fight for and protect the American people.”

The Senate needed 60 votes to defeat a filibuster on the measure, but barely a majority voted for it. Five Democrats sided with most Republicans to keep the government open: Senators Joe Donnelly of Indiana, Heidi Heitkamp of North Dakota, Doug Jones of Alabama, Joe Manchin of West Virginia, and Claire McCaskill of Missouri. All but Jones, who defeated Roy Moore in an upset win last month, are up for reelection next year in states Trump carried in 2016. But four Republicans sided with Democrats to block the bill and shutter the government: Senators Jeff Flake of Arizona, Lindsey Graham of South Carolina, Mike Lee of Utah, and Rand Paul of Kentucky. (Senate Majority Leader Mitch McConnell ultimately voted against the bill, but only for procedural reasons to allow him to bring it up again.)

Despite late efforts to reach a deal on an even shorter-term extension of funding, the bill’s defeat appeared to guarantee at least a brief shutdown, the first since conservatives forced a lapse in funding in a fight over the Affordable Care Act in 2013.

Early in the afternoon, Trump called Schumer to the White House for a 90-minute meeting to resolve the impasse. But it was inconclusive. Schumer said little immediately after the meeting but later confirmed that he had made an offer to the president on DACA that included support for Trump’s prized border wall—which Democrats have largely opposed for more than a year. “But even that was not enough,” Schumer said in a floor speech early Saturday after the climactic Senate vote.

He said that while Trump was initially amenable to his offer, he refused to push McConnell and House Speaker Paul Ryan to accept it. Schumer contrasted Trump’s reluctance to back the deal with his earlier promise, in a roomful of lawmakers during a public meeting at the White House, to “take the heat” for a politically risky immigration accord.

“What happened to that president?” Schumer asked. “He backed off at the first sign of pressure.”

McConnell, meanwhile, lashed into Democrats for what he called a “cynical” move to shut down the government over immigration, noting that the deadline for protecting Dreamers would not come until March. “The government shutdown was 100 percent avoidable,” the majority leader said. And he suggested that he would hold votes throughout the weekend aimed at demonstrating Democratic intransigence if necessary. “The government may be heading into a shutdown, but the Senate isn’t shutting down,” McConnell said.

The failed vote was a long time coming. Democrats had been opposed to the four-week extension passed by the House, and by late Friday afternoon, the only hope for a last-minute deal appeared to be one that would keep the government open for another few days—but not a full month—to force Democrats, Republicans, and the White House to come together on a broader agreement. Democrats weren’t willing to let the immigration issue languish any longer than that, and a handful of GOP holdouts in the Senate was demanding a bill that would fully fund the military for the remainder of the year rather than on a week-to-week or month-to-month basis.

“I am not going to support continuing this fiasco for 30 more days,” Graham tweeted on Friday morning. “It’s time Congress stop the cycle of dysfunction, grow up, and act consistent with the values of a great nation.”

Mick Mulvaney, Trump’s budget director, told reporters outside the White House early Friday evening that while it appeared the government might shut down briefly, there was “a good chance” for an agreement before most federal offices reopened on Monday morning.

With a defeat likely, Senate Majority Leader Mitch McConnell had held off on calling an immediate vote on legislation House Republicans approved Thursday night that combined a stopgap spending measure with a long-term reauthorization of the Children’s Health Insurance Program. Despite their support for CHIP, most Senate Democrats indicated they would vote against the continuing resolution in protest of Trump’s opposition to a bipartisan deal to provide permanent legal status for young immigrants who face the threat of deportation once the president ends the Deferred Action for Childhood Arrivals program in early March.

The shutdown is the first to occur with one party—in this case, Republicans—controlling both Congress and the White House. With a new poll showing more voters would blame the GOP for the government’s closure, Republicans tried to deflect. “This is purely an attempt by Senate Democrats to try to get a shutdown that they think the president gets blamed for,” Mulvaney told reporters at the White House on Friday.

Trump postponed a trip on Friday afternoon to his Mar-a-Lago estate in Florida, where he had planned to celebrate the one-year anniversary of his inauguration on Saturday. In a sign that a last-minute deal might have been possible, House leaders had instructed members to stay in Washington and remain “flexible” in case the Senate sent them a revised funding bill right before the deadline. But as the hours ticked away on Friday, that possibility seemed ever more remote. And by midnight, Congress’s window had closed.

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