The US government is approaching a federal shutdown after the Senate failed to agree on a new budget.
It was unclear which way the vote would go as the midnight deadline approached, with Republicans and Democrats split on key issues.
Despite last minute bipartisan meetings, the bill to fund the government until 16 February did not receive the required 60 votes.
The last US shutdown happened in 2013 and lasted for 16 days.
The House of Representatives voted 230-197 on Thursday night to extend funding until next month, but the measure failed to pass the Senate.
Many government offices will close unless a compromise is found before the midnight deadline.
If the shutdown goes ahead essential services will still run. That includes national security, post, air traffic control, inpatient medical services, emergency outpatient medicine, disaster assistance, prisons, taxation and electricity production.
National parks and monuments could face closure, which provoked an angry public reaction during the last shutdown.
In the hours before the vote, President Donald Trump sounded pessimistic, tweeting that it was “not looking good for our great Military or Safety & Security on the very dangerous Southern Border”.
He had invited Democratic Senate leader Chuck Schumer, a fellow New Yorker, to the White House for last-ditch talks but they failed to find sufficient common ground.
Emerging about an hour later, Mr Schumer told reporters “some progress” had been made, but a “good number of disagreements” remained, including a difference in opinion regarding the Democrats’ desire to extend talks for another five days.