The Democratic-controlled US Senate has passed a bill to fund the government through to mid-February, averting the risk of a shutdown after overcoming a bid by some Republicans to delay the vote in a protest against vaccine mandates.
The 69-28 vote leaves government funding at current levels through to February 18, and gives Democratic President Joe Biden plenty of time to sign the measure before funding was set to run out at midnight on Friday.
The Senate acted on Thursday hours after the House of Representatives approved the measure, by a vote of 221-212, with the support of only one Republican.
Congress faces another urgent deadline right on the heels of this one. The federal government is approaching its $US28.9 trillion ($A40.7 trillion) borrowing limit, which the Treasury Department has estimated it could reach by December 15.
Failure to extend or lift the limit in time could trigger an economically catastrophic default.
"I am glad that in the end, cooler heads prevailed. The government will stay open and I thank the members of this chamber for walking us back from the brink from an avoidable, needless and costly shutdown," Democratic Senate Majority Leader Chuck Schumer said on nailing down a deal with Republicans to clear the way for passing the bill.
The vote ended weeks of suspense over whether Washington might be plunged into a government shutdown at a time when officials worry the potentially dangerous Omicron variant of COVID-19 could take hold in the United States after being discovered in South Africa.
Such a shutdown could have forced lay-offs of some US government medical and research personnel.
Senate Democrats defeated an attempt by a handful of conservative Republicans to attach an amendment that would have prevented enforcement of Biden's coronavirus vaccine mandate for many US workers.
Over the past few days, Senate Minority Leader Mitch McConnell insisted there would be no government shutdown from congressional inaction. But he had to work through the day on Thursday to get his Republican lawmakers in line on a deal allowing quick passage of the funding bill.
The emergency legislation is needed because Congress has not yet passed the 12 annual appropriations bills funding government activities for the fiscal year that began on October 1.
A partial government shutdown would have created a political embarrassment for both parties, but especially for Biden's Democrats, who narrowly control both chambers of Congress.
The fact the temporary spending bill extends funding into February suggested a victory for Republicans in closed-door negotiations. Democrats had pushed for a measure that would run into late January, while Republicans demanded a longer timeline leaving spending at levels agreed to when Republican Donald Trump was president.
But she said Democrats prevailed in including a $US7 billion ($A9.9 billion) provision for Afghanistan evacuees.
Once enacted, the stopgap funding measure would give Democrats and Republicans nearly 12 weeks to resolve their differences over the annual appropriations bills totalling around $US1.5 trillion ($A2.1 trillion) that fund "discretionary" federal programs for this fiscal year.
Those bills do not include mandatory funding for programs such as the Social Security retirement plan that are renewed automatically.
Australian Associated Press