The United States Senate voted 60-40 on Sunday night to advance a bipartisan funding deal that could end the longest government shutdown in American history, breaking a 40-day stalemate that has left federal workers unpaid, delayed food aid for millions and snarled air travel across the country.

Eight members of the Senate Democratic caucus broke with their party leadership to supply the votes Republicans needed to clear the 60-vote filibuster threshold: Dick Durbin of Illinois, John Fetterman of Pennsylvania, Maggie Hassan and Jeanne Shaheen of New Hampshire, Tim Kaine of Virginia, Catherine Cortez Masto and Jacky Rosen of Nevada, and independent Angus King of Maine. Senate Democratic leader Chuck Schumer voted against advancing the package, along with most of his caucus.

The shutdown began on 1 October after Congress failed to agree on funding, and at 40 days it has already passed every previous shutdown in length. Roughly 1.4 million federal workers have been furloughed or working without pay, food assistance has been disrupted for tens of millions of Americans, and flight delays have mounted as air traffic controllers and other essential staff worked unpaid.

The deal was brokered over the weekend by Senate Majority Leader John Thune, Hassan, Shaheen and King, Senate Appropriations Chair Susan Collins and White House negotiators, after weeks in which Republicans lacked the votes to move any funding bill. “After 40 long days, I’m hopeful we can bring this shutdown to an end,” Thune said shortly before the vote.

The package uses a House-passed stopgap bill as its vehicle and combines it with three full-year spending bills — for the Agriculture Department and the Food and Drug Administration, the Department of Veterans Affairs and military construction, and the legislative branch. All other agencies would be funded through 30 January under a continuing resolution.

The agreement would also fully fund the Supplemental Nutrition Assistance Program, which serves about 42 million lower-income Americans, through September next year, and it would reinstate federal workers dismissed at the start of the shutdown, restore their jobs with back pay, and bar agencies from further layoffs until the temporary funding expires.

On the central sticking point, the deal does not extend the Affordable Care Act subsidies due to expire at the end of the year — the concession Democrats had demanded for weeks as the price of reopening the government. Instead, Thune committed to holding a Senate vote on extending the subsidies no later than the second week of December, a vote with no guaranteed outcome.

That compromise has split the Democratic Party. Moderates who backed the deal said the mounting harm to workers and families outweighed the value of holding out for a guaranteed vote on health care, while progressives and Schumer argued that accepting a mere promise surrendered the party’s main leverage. The eight who crossed the aisle now face sharp criticism from within their own ranks.

Sunday’s vote does not reopen the government by itself. The legislation must clear further Senate procedural steps and final passage, then win approval in the House of Representatives — which has not been in session since 19 September — before going to President Donald Trump for his signature, a process that could take several days. House Speaker Mike Johnson has told lawmakers to return to Washington, with the earliest House vote expected on Wednesday afternoon.

If the package clears both chambers, federal offices and services would begin reopening later in the week, workers would receive back pay, and food aid would resume in full. But with funding running only until late January, and the promised December vote on health subsidies far from certain, lawmakers could find themselves facing the same standoff again within weeks — a prospect both parties will be weighing as the bill moves to the House.