Image copyright Reuters Image caption Donald Trump said the wall could be made of steel, rather than concrete

President Donald Trump has refused to compromise on his demand for a wall to be built on the Mexican border, the cause of a partial government shutdown.

He said he did not think he would have to reduce the $5.6bn (£4.4bn) in funds he was demanding and repeated a threat to declare a national emergency.

His new chief of staff Mick Mulvaney said earlier he expected the shutdown to "drag on a lot longer".

Democrats refuse to back the funding, calling the wall "immoral".

Talks to end the partial shutdown will resume later on Sunday, with the stalemate now in its third week, affecting some 800,000 federal workers.

The wall was one of Mr Trump's key campaign pledges and he had said Mexico would pay for it, something Mexico has never agreed to.

What has Mr Trump said?

He was speaking as he left the White House for Camp David, where he will discuss policy issues with aides.

"We have to build the wall," he said. "It's about safety, it's about security for our country... We have no choice... it's a very important battle to win."

Mr Trump said he thought the Democrats "want a deal", adding: "The shutdown could end tomorrow or go on a long time. It really depends on the Democrats."

But he also repeated an earlier threat to declare a national emergency "depending on what happens in the next few days".

Image copyright Reuters Image caption Mick Mulvaney: "I think this is going to drag on a lot longer"

US law allows him to direct military construction projects under those circumstances but the money would have to come from defence department funds and there would inevitably be legal challenges by the Democrats that would drag out the matter.

Mr Trump also repeated the idea of building the wall out of "steel instead of concrete", presumably in the hope that Democrats could then claim it was not a wall.

The idea has not gained traction with the Democrats so far.

Mr Mulvaney told NBC's Meet the Press on Sunday that he thought the controversy was "going to drag on a lot longer. I think that's... by intention". He did not elaborate.

The talks between the Democrats and Republicans on the shutdown will resume on Sunday afternoon.

Is there any way out?

Both sides believe their core support backs their stance, so leeway is limited.

A Reuters/Ipsos opinion poll suggested 50% blamed the president for the shutdown, while 32% saw the Democratic Party as culpable.

Image copyright EPA Image caption Democrats House Speaker Nancy Pelosi and Senate Minority Leader Chuck Schumer walk out of the West Wing

One idea that has been floated, reportedly by Trump adviser Jared Kushner at the meeting on Saturday, was to give the Democrats new measures on young immigrants called "Dreamers", in exchange for the wall funding.

Dreamers are immigrants who illegally entered the US as children. Democrats want to ensure that they are shielded from deportation but have refused to link the issue with a deal on wall funding.

Some conservatives are also reportedly alarmed at any offer on the Dreamers.

Ms Pelosi said after the failed talks on Saturday her party would introduce piecemeal bills aimed at reopening certain government agencies, starting with the Internal Revenue Service and the Treasury Department.

"This action is necessary so that the American people can receive their tax refunds on schedule," she said.

The bills may amount to little more than extra pressure on the president.

How did we get here?

Partial shutdowns occur when Congress cannot agree a budget by a certain deadline or the president refuses to sign it.

That happened on 22 December and a quarter of the government has been closed since, leaving some 800,000 workers either furloughed - a kind of temporary leave of absence - or working without pay.

The Senate had actually reached bipartisan agreement on a budget but Mr Trump then refused to back it, demanding the funding for the wall.

Media playback is unsupported on your device Media caption The return of the woman Republicans love to hate

The House then passed a bill including funding for the wall, when the Republicans still had a majority there, but they could not get the necessary 60 votes in the 100-seat Senate.

When the Democrats took control of the new Congress this week, they passed spending bills to reopen the government. The leader of the Republican-controlled Senate, Mitch McConnell, immediately called the move "a time-wasting act of political posturing".

In Friday's news conference, Mr Trump told reporters he might consider asking his cabinet to decline a $10,000 pay rise that is due to take effect because a pay freeze has expired as an inadvertent result of the shutdown.

What is the shutdown and how is it affecting people?

Unpaid workers are clearly feeling the pinch.

Transport Security Administration employee Brian Turner told the BBC he might have to look for another job if the shutdown continued.

"We have a five-month-old son so we have about a month left before we're going to have to start having those difficult conversations about what to do next," he said.

Many workers, but by no means all, are likely to get back pay when the shutdown is resolved.

Food and Drug Administration commissioner Scott Gottlieb said on Saturday his agency had only a month's funding left for some of its activities.

The shutdown means:

About 25% of the US federal government has no funding

Nine departments have been affected, including Homeland Security, Justice, Housing, Agriculture, Commerce, Interior, and the Treasury

Native American tribes who receive substantial federal funding are struggling

National Parks have become hazardous without staff

Are you a federal employee or contractor affected by the government shutdown? Share your experiences by emailing haveyoursay@bbc.co.uk.

Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: