Media playback is unsupported on your device Media caption Trump: "Any measure that funds the government must include border security"

US President Donald Trump has vowed a "very long" government shutdown if Democrats do not fund his border wall.

Mr Trump is demanding $5.7bn (£4.5bn), 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.

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.

What next?

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 say.

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.

Image copyright Getty Images Image caption Rain falls on the White House on Thursday night

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 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."

Republican Senator Lamar Alexander of Tennessee also said he would vote no.

Mr Alexander, who announced his retirement this week, said in a statement: "I want to put a stop to this practice of the Senate breaking its rules to change its rules."

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.

Media playback is unsupported on your device Media caption Mr Trump said he would take responsibility for a shutdown in testy exchanges with Democrats Nancy Pelosi and Chuck Schumer

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.

What's the other reaction?

"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% avoidable", accusing Mr Trump of "choosing funding for his ineffective and wasteful border wall over what's best for our country".

Skip Twitter post by @SenCortezMasto President 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. — Senator Cortez Masto (@SenCortezMasto) December 21, 2018 Report

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.