United States President Donald Trump has threatened retaliation if Senate Democrats vote down a bill that includes funds for a Mexican border wall.
Mr Trump has promised a "very long" government shutdown if Democrats do not fund his border wall.
Mr Trump has demanded $US5.7bn, which was passed by the House of Representatives, but is expected to be rejected in the Senate.
"I hope we don't but we are totally prepared for a very long shutdown," he said during a White House event.
If no deal is reached, parts of the US government will begin to close at midnight on Friday (6pm tonight, New Zealand time).
With only hours remaining to strike a deal, Mr Trump said that the "chances are probably very good" of a "Democrat shutdown".
The Republican president met senators from his own party beforehand at the White House, where they held a "great meeting" that "lasted a long time", he added.
"Shutdown today if Democrats do not vote for Border Security!" he tweeted earlier on Friday.
The Senate is currently voting on a measure that the House approved a day earlier, by 217-185.
The window for senators to vote will remain open for much of the day on Friday, as senators return to Washington from around the country.
Mr Trump will postpone his Christmas trip to Florida in the event of a shutdown, aides said.
Any partial shutdown would be the third such closure of federal agencies in 2018. If it occurs, it may not be settled until after the New Year, when Democrats take control of the House.
What did Mr Trump say?
In early morning tweets on Friday, Mr Trump accused Democrats of "trying to belittle the concept of a Wall, calling it old fashioned".
"The fact is there is nothing else's that will work, and that has been true for thousands of years. It's like the wheel, there is nothing better," Mr Trump wrote.
"In Israel the Wall is 99.9% successful," he added. "Will not be any different on our Southern Border!"
"If the Dems vote no, there will be a shutdown that will last for a very long time. People don't want Open Borders and Crime!"
A budget agreement seemed a done deal this week until Mr Trump dug in his heels after he was hit by a rare backlash from hardline conservatives outraged by the lack of wall funding.
He is now urging Senate Republican leader Mitch McConnell to invoke the so-called "nuclear option".
What's the 'nuclear option'?
It is a rule change that would allow the budget to pass by a simple majority of 51 votes, rather than the 60 currently required under Senate rules.
The president's fellow Republicans currently have 51 seats in the 100-seat Senate.
But Mr McConnell has repeatedly refused in the past to invoke such an extreme legislative manoeuvre.
A number of Republican senators on Friday made clear their staunch opposition to the "nuclear option".
They warned it would be politically explosive in an upper chamber that prides itself on cross-party comity.
Retiring Republican Senator Jeff Flake of Arizona tweeted: "Deploying the nuclear option would blow that [bipartisanship] up. I will not vote to do it."
Democratic Senator Carl Levin of Michigan said it would be "like allowing the home team to change the rules in the middle of the game".
What happens at midnight?
Roughly a quarter of federal agencies - including the departments of Homeland Security, Transportation, Agriculture, State, and Justice - will shut down by the end of Friday if no deal is reached.
National parks and forests will close.
But federal programmes on pensions and healthcare will continue to function, as will the military, border patrol, coast guard, federal judiciary, air traffic control and airport security.
The US Postal Service, which is delivering millions of packages before Christmas, will also be unaffected as it is an independent agency.
More than 800,000 government employees will either have to stay at home unpaid, or work without pay.
"Ugh, are you ruining my life?" said Republican Senator Susan Collins when she was told by reporters of Mr Trump's vow to veto any budget deal missing funds for a US-Mexico border wall.
Democratic Senator Kirsten Gillibrand called the shutdown "100 percent avoidable", accusing Mr Trump of "choosing funding for his ineffective and wasteful border wall over what's best for our country".
Mr Trump said previously that American taxpayers would not have to pay for his wall. Now, he is focused on shutting down the government to force taxpayers to pay $5 billion for an ineffective border wall.
Meanwhile, a US military veteran's grassroots $1bn fundraiser to erect a border wall, and "help President Trump make America safe again", has raised over $12m.
A rival online campaign, called "Ladders to Get Over Trump's Wall", has raised nearly $75,000 in its first day.