Image copyright Getty Images Image caption A US Border Patrol vehicle is seen near prototypes for Mr Trump's proposed wall

US President Donald Trump's signature campaign pledge to build a wall along the US-Mexico border is at stake in a major budget battle this week.

A partial government shutdown is looming on Friday if Congress cannot agree funding for federal agencies.

Democrats are refusing White House demands for $5bn (£3.9bn) towards constructing such a wall.

Mr Trump said last week he would be "proud" to shut down his own government if he did not secure the funding.

The Republican president has been unable to loosen legislative purse strings for the project, even with his party controlling both the Senate and House of Representatives for nearly two years.

That challenge is only likely to get more difficult once Democrats formally regain control of the lower chamber next month, as a result of the mid-term elections in November.

Media playback is unsupported on your device Media caption President Trump and Democratic leaders clash over border wall funding in a feisty Oval Office meeting.

The Trump playbook

Tara McKelvey, BBC News White House reporter, Washington

Most people in the US - 57%, according to a new poll - want Trump to back down on the issue of the border wall and allow the government to continue its work. But he refuses to budge. His decision to dig in his heels and say he's ready to shut down the government to get what he wants is Vintage Trump: he knows his base will love his contrary stance.

And, as his critics in Congress point out, he also knows his position will create a stir and distract people from other issues - such as the investigation into alleged Russian meddling in the 2016 election. In the end, the government's work will continue one way or another (lawmakers will ensure that). And Trump will complain. For him, being obstreperous is a win-win.

What are both sides saying?

On Sunday, White House senior adviser Stephen Miller told CBS Face the Nation that Mr Trump is "absolutely" ready to let a shutdown occur.

"The Democrat Party has a simple choice," he said. "They can either choose to fight for America's working class or to promote illegal immigration. You can't do both."

On Monday, Mr Trump took to Twitter to attack Democrats who say "you can have good Boarder [sic] Security without a Wall".

Image copyright Getty Images Image caption Stephen Miller is considered the architect of Mr Trump's immigration policy

The president has previously requested $25bn for the project.

But in the current spending impasse, Democrats say they are only willing to sign off up to $1.6bn.

And that money comes with conditions - it could only be used to upgrade existing fencing along the border, not to build a wall.

Democratic Senate leader Chuck Schumer appeared on NBC Meet the Press on Sunday, and vowed Mr Trump "is not going to get the wall in any form".

"We should not let a temper tantrum - threats - push us in the direction of doing something that everybody, even our Republican colleagues, know is wrong," said the New York senator.

What happens in a shutdown?

Border security funding only constitutes a fraction of the $450bn or so Congress is set to approve to fund federal agencies that will otherwise run out of money on 21 December.

Roughly a quarter of the federal government - including the departments of Homeland Security, Transportation, Agriculture, State, and Justice - will shut down at midnight on Friday if no deal is reached.

The US Postal Service, which is delivering a flurry of packages ahead of Christmas, will not be affected because it is an independent agency.

Media playback is unsupported on your device Media caption Trump: 'These are, like, professional mountain climbers'

Has Trump started building the wall?

Despite repeatedly claiming that construction on the wall is under way, Mr Trump's long-promised physical barrier has yet to materialise.

The Department of Homeland Security has replaced some old barriers and is erecting fewer than 40 miles of new bollard fencing.

But those barriers bear little resemblance to the wall prototypes unveiled by the president to much fanfare this year and last.