US President Donald Trump has threatened that if Senate Democrats don’t go along with his demand for border wall money, “there will be a shutdown that will last for a very long time.”

Last week, Mr Trump said he would be “proud” to shut down the government, which Republicans now control, in the name of border security.

“I will take the mantle. I will be the one to shut it down,” he asserted.

But with the hours dwindling before the midnight deadline, Mr Trump sought to reframe the debate and make Democrats the holdouts to settling an impasse that threatens hundreds of thousands of federal workers on the eve of the end-of-the-year holidays.

And he exhorted the Senate’s Republican leader to corral enough Democratic votes to send a House-passed plan to the White House, even though the measure is almost certain to be rejected in the Senate.

“Senator Mitch McConnell should fight for the Wall and Border Security as hard as he fought for anything. He will need Democrat votes, but as shown in the House, good things happen. If enough Dems don’t vote, it will be a Democrat Shutdown!” he tweeted.

At the same time, Mr Trump tweeted he expected Democrats “will probably vote against Border Security and the Wall even though they know it is DESPERATELY NEEDED. 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!”

The Senate has been called back into session to consider a package approved by House Republicans late on Thursday that includes the $5.7 billion ($A8 billion) Mr Trump wants for the border with Mexico.

Senators had passed their own bipartisan bill earlier in the week to keep the government running, with border security at existing levels, $1.3 billion ($A1.8 billion), but no money for the wall.

Both bills would extend government funding through February 8.

The White House said Mr Trump would not travel to Florida on Friday as planned for the Christmas holiday if the government were shutting down.

More than 800,000 federal workers will be facing furloughs or forced to work without pay if a resolution is not reached before funding expires at midnight on Friday (local time).

At issue is funding for nine of 15 Cabinet-level departments and dozens of agencies, including the departments of Homeland Security, Transportation, Interior, Agriculture, State and Justice, as well as national parks and forests.

The shutdown crisis could be one of the final acts of the House GOP majority before relinquishing control to Democrats in January.

Congress had been on track to fund the government but lurched when Mr Trump, after a rare lashing from conservative supporters, declared on Thursday that he would not sign a bill without the funding.

Conservatives want to keep fighting. They warn that “caving” on Mr Trump’s repeated wall promises could hurt his 2020 re-election chances, and other Republicans’ as well.

The GOP-led House voted largely along party lines, 217-185, to attach the border wall money to the Senate’s bill.

Even though Republicans have a slim majority, 60 votes are needed to approve the bill there.

One possibility is that the Senate strips the border wall out of the bill but keeps the disaster funds and sends it back to the House. House politicians said they were being told to stay in town for more possible votes.

It comes a day after Mr Trump’s Defence Secretary James Mattis stepped down over the US withdrawal of troops from Afghanistan and Syria.

Yesterday Mr Trump also signed a massive $867 billion ($A 1.2 trillion) Farm Bill or Agricultural Improvement Act into law, and celebrated on Twitter with a #tbt tweet.