The US Senate has approved a compromise that would end the longest government shutdown in US history, breaking a weeks-long stalemate that has disrupted food benefits for millions and left hundreds of thousands of federal workers unpaid.
The 60-40 vote passed with the support of nearly all of the chamber's Republicans and eight Democrats, who unsuccessfully sought to tie government funding to health subsidies that are due to expire at the end of the year.
While the agreement sets up a December vote on those subsidies, which benefit 24 million Americans, it does not guarantee they will continue.
The deal would restore funding for federal agencies that politicians allowed to expire on 1 October and would stall President Donald Trump's campaign to downsize the federal workforce, preventing any layoffs until 30 January.
It next heads to the Republican-controlled House of Representatives, where Speaker Mike Johnson has said he would like to pass it as soon as tomorrow and send it on to Mr Trump to sign into law.
Mr Trump has called the deal to reopen the government "very good."
The deal would extend funding until 30 January, leaving the federal government for now on a path to keep adding about $1.8 trillion a year to its $38 trillion in debt.
Coming a week after Democrats won high-profile elections in New Jersey, Virginia and elected a democratic socialist as the next mayor of New York City, the deal has provoked anger among many Democrats who note there is no guarantee that the Republican-controlled Senate or House would agree to extend the health insurance subsidies.
"We wish we could do more," said Senator Dick Durbin of Illinois, the chamber's No 2 Democrat.
"The government shutting down seemed to be an opportunity to lead us to better policy. It didn't work."
A late October Reuters/Ipsos poll found that 50% of Americans blamed Republicans for the shutdown, while 43% blamed Democrats.
US stocks rose yesterday, buoyed by news of progress on a deal to reopen the government.
Mr Trump has unilaterally cancelled billions of dollars in spending and trimmed federal payrolls by hundreds of thousands of workers, intruding on Congress's constitutional authority over fiscal matters.
Those actions have violated past spending laws passed by Congress, and some Democrats have questioned why they would vote for any such spending deals going forward.
The deal does not appear to include any specific guardrails to prevent Mr Trump from enacting further spending cuts.
However, the deal would fund the SNAP food-subsidy programme until 30 September next year, heading off any possible disruptions if Congress were to shut down the government again during that time.
Trump threatens air traffic controllers who fail to return to work as flight cancellations jump
Meanwhile, Mr Trump demanded air traffic controllers return to work as travellers endured another day of flight cancellations, which the administration ordered to manage staff shortages during the government shutdown.
His comment came after the US aviation system has suffered serious disruptions in recent days as air traffic controller absences soared while they work without pay. Some are absent as they need to work second jobs or cannot afford childcare.
An airline trade group said 1.2 million customers on Saturday and Sunday had flights delayed or cancelled due to air traffic issues.
Threatening to curtail the pay of any controller who did not return to work, Mr Trump said he would award those who have not taken time off during the 41-day shutdown $10,000 bonuses and would welcome the resignations of the rest.
"All Air Traffic Controllers must get back to work, NOW!!! Anyone who doesn't will be substantially 'docked,'" Mr Trump wrote on social media. "REPORT TO WORK IMMEDIATELY."
Even before the shutdown, the Federal Aviation Administration was about 3,500 air traffic controllers short of targeted staffing levels. Many had been working mandatory overtime and six-day weeks.
Officials said it was unclear how the White House could deny pay under the controllers' union contract once the government reopens, as Mr Trump threatened, or how the president would pay for the proposed $10,000 bonuses.
"I don't know - I'll get it from some place," he told Fox News last night.
Some 20% to 40% of air traffic controllers have been absent on any given day at the 30 biggest US airports during the shutdown, the FAA said last week.
The FAA imposed ground delay or ground stop programmes due to staffing issues at nine airports including Houston, New York, Newark, Chicago, San Francisco, Phoenix and Las Vegas and it was slowing flights in Florida.