Donald Trump has said parts of the US federal government will remain closed until Democrats agree to put up more walls along the US-Mexico border to deter criminals.

In a Christmas Day appearance in the Oval Office, Mr Trump issued a lengthy defence of his desire for a wall, saying it is the only way to stop drugs and human traffickers from entering the US.

In a nod to the political stakes he’s facing, the president said he wants the wall by “election time” in 2020.

The promise of a border wall was a central component of Mr Trump’s presidential campaign.

“I can’t tell you when the government’s going to be open. I can tell you it’s not going to be open until we have a wall or fence, whatever they’d like to call it,” Mr Trump said, referring to Democrats who staunchly oppose walling off the Mexican border.

“I’ll call it whatever they want, but it’s all the same thing,” he told reporters after participating in a holiday video conference with representatives from the five branches of the US military stationed in Alaska, Bahrain, Guam and Qatar.

Mr Trump argued that drug flows and human trafficking can only be stopped by a wall.

“We can’t do it without a barrier. We can’t do it without a wall,” he said. “The only way you’re going to do it is to have a physical barrier, meaning a wall. And if you don’t have that then we’re just not opening” the government.

Central American Migrant Caravan
A Honduran migrant climbs the US border fence at Tijuana, Mexico (Daniel Ochoa de Olza/AP)

Democrats oppose spending money on a wall, preferring instead to pump the dollars into fencing, technology and other means of controlling access to the border.

Mr Trump argued that Democrats oppose a wall only because he is for one.

The stalemate over how much to spend and how to spend it caused the partial government shutdown that began on Saturday following a lapse in funding for departments and agencies that make up about 25 percent of the US government.

Some 800,000 government workers are affected. Many are still working but must wait until after the shutdown to be paid again.

Mr Trump claimed that many of these workers “have said to me and communicated ‘stay out until you get the funding for the wall’. These federal workers want the wall. The only one that doesn’t want the wall are the Democrats.”

Leading Democrats Senator Chuck Schumer and Congresswoman Nancy Pelosi claimed Mr Trump “wanted the shutdown, but he seems not to know how to get himself out it”.

Mr Trump said he envisions a wall so tall “like a three-story building”, that only an Olympic champion would be able to scale it.

He also compared Democrats’ treatment of him over the border issue to their defence of James Comey after Mr Trump fired him as FBI director.

“It’s a disgrace what’s happening in our country but, other than that, I wish everybody a very merry Christmas,” he said.