The US has narrowly avoided a government shutdown – with just three hours to spare before current funding expired.
A rushed package means agencies will be able to continue operating as normal for the next 45 days, ending turmoil in Washington.
However, this temporary solution has dropped aid to Ukraine – an issue that will need to be revisited with a growing number of Republican lawmakers.
Had a deal not been reached, four million government employees would have been left unpaid – with national parks and financial regulators forced to shut their doors.
Active-duty soldiers would have had to work without pay, with nutrition aid to seven million poor mothers suspended.
There could also have been knock-on effects with airport security and border control, delaying passengers.
Democratic Senate majority leader Chuck Schumer said: “The American people can breathe a sigh of relief – there will be no government shutdown … today, MAGA extremism has failed and bipartisanship has prevailed.”
A shutdown had looked all but inevitable earlier in the week, with right-wing Republicans calling for government agencies to slash their budgets by up to 30% – a move that the White House and the Democrats rejected as too extreme.
That plan collapsed on Friday, with Republican House Speaker Kevin McCarthy abandoning those demands.
He instead relied on Democrats to pass the bill – putting his own job at risk – paving the way for the Senate to pass the measure 88-9.
Mr McCarthy later struck a defiant tone and dismissed concerns he could be ousted as leader, telling reporters: “I want to be the adult in the room, go ahead and try.
“And you know what? If I have to risk my job for standing up for the American public, I will do that.”
President Joe Biden has welcomed the deal, and says it prevents “an unnecessary crisis that would have inflicted needless pain on millions of hard-working Americans”.
He added: “I want to be clear – we should never have been in this position in the first place. Just a few months ago, Speaker McCarthy and I reached a budget agreement to avoid precisely this type of manufactured crisis.
“For weeks, extreme House Republicans tried to walk away from that deal by demanding drastic cuts that would have been devastating for millions of Americans. They failed.”
Mr Biden went on to warn that US support for Ukraine cannot be interrupted when the country is at a “critical moment”.