The US government has avoided a federal shutdown after both House and Senate agreed on a short-term funding deal.
A bill ensuring funding until 17 November received overwhelming support, and was signed into law by President Joe Biden minutes before a deadline.
However, it was stripped of any new aid for Ukraine for its war against Russia – a key Democrat demand.
Republican House Speaker Kevin McCarthy submitted the bill in defiance of hard-liners in his own party.
A government shutdown, which would place tens of thousands of federal employees on suspension without pay and suspend various government services, was slated to begin at one minute past midnight on Sunday.
A majority of lawmakers were keen to avert a shutdown, and the bill was backed by more Democrats than Republicans, with as many as 90 House Republicans voting against it.
The move was a blow to a small group of right-wing Republicans who have held up negotiations in the chamber with unyielding demands for spending cuts and no new aid for Ukraine.
In a statement released shortly after the Senate vote, President Joe Biden said “extreme House Republicans” had sought to create a “manufactured crisis”, and urged Speaker McCarthy to allow a further funding deal for Ukraine to pass without delay.
He said the US cannot under any circumstances allow American support for Ukraine to be interrupted.