The Republican-controlled Senate’s bid to avert a US government shutdown is teetering on the brink of collapse as it races against a midnight deadline.
The House of Representatives voted 230-197 on Thursday night for a bill to extend funding until next month.
But the upper chamber is set for a nail-biting vote, with Republicans and Democrats still split on immigration.
President Donald Trump has called off a trip to his Florida golf club this weekend until a deal can be struck.
What is this bill?
It is the fourth short-term budget measure to squeeze through a gridlocked Congress since the fiscal year began in October.
Federal agencies are funded through annual budget appropriations bills.
But at the moment Capitol Hill is too engulfed by rancour over how the cash should be spent to agree a longer-term package.
This current bill would only keep the government funded until 16 February – so the whole drama may be replayed in the coming weeks.
Can it pass the Senate?
Right now, no – the budget package doesn’t have the 60 required votes.
Republicans only have 51 seats in the 100-member chamber.
There are a maximum of 47 Republicans in favour. Despite conservative pleas for unity so they can blame any shutdown on Democrats, three Republican senators are leaning ‘no’.
Lindsey Graham, of South Carolina, says he is opposed because he wants more military spending and an immigration deal. Rand Paul, of Kentucky, is citing concerns about the federal debt. And Jeff Flake, of Arizona, said on Thursday night he was not “inclined” to vote for the short-term bill.
He is backing a Democratic plan to approve enough federal funds for a few more days to allow both sides to negotiate a longer-term fix.
So to get through, the bill would need a dozen Democrats, out of 49.
But only one – Joe Manchin, of West Virginia – has so far said he will definitely vote for it.
What’s the problem?
The main bone of contention has been Democrats’ demands for more than 700,000 undocumented immigrants who entered the US as children to be protected from deportation.
These “Dreamers”, as they are known, were granted temporary legal status under a programme established by former President Barack Obama.
In September, Mr Trump announced he was ending the programme and allowing Congress until March to come up with a replacement.
The Republican president and congressional conservatives have been using the issue as a bargaining chip in an attempt to wring concessions from Democrats.
Mr Trump wants funding for tough new border controls, including his proposed US-Mexico wall.
Republicans have inserted into the bill a six-year extension of a health insurance programme for children in lower-income families. They are essentially daring Democrats to vote against a measure that has been a longstanding priority for liberals.
But Democrats say they want this programme extended permanently.
The legislative negotiations went up in flames last week after Mr Trump reportedly complained about letting in immigrants from certain “shithole countries”.
What could be the political fallout?
The blame game is already in full swing with neither party wishing to be held responsible for closing the government as midterm elections loom in November.
This would be the first shutdown while one party is in control both chambers of Congress and the White House, which could be politically embarrassing for Republicans.
It’s also problematic for 10 Democratic senators who are up for re-election this year in states won by Mr Trump.
If they vote ‘no’, they will face voters this autumn amid a hail of attack ads claiming they shut down the government to help undocumented immigrants.
In a late-night speech on the Senate floor, top Republican Mitch McConnell accused Democrats of aiming to “hold the entire country hostage”.
Mindful of the risks, Democrats have shifted their messaging in recent days to say their ‘no’ votes are about much more than just immigration.
Democrats hope to make it instead about the president and Republicans’ ability to govern.
Tennessee Democrat Steve Cohen tweeted of Mr Trump: “This man doesn’t comprehend work ethic, the office of President, or duty to the country. He understands golf, ice cream, and Big Macs!”
What happens in a shutdown?
Essential services would still run. That includes national security, post, air traffic control, inpatient medical services, emergency outpatient medicine, disaster assistance, prisons, taxation, electricity production and the military.
National parks and monuments could face closure, which provoked an angry public reaction during the last shutdown.
The Trump administration is reportedly making contingency plans to keep the parks running if no deal is reached.
Visa and passport processing could also be delayed.