The President claims White House lawyers have assured him that the action would withstand legal scrutiny “100%”.

He said that “if for any reason we don’t get this going”, referring to an agreement with Democrats who have refused to approve the funding, “I will declare a national emergency”.

On a visit to McAllen, Texas, and the Rio Grande, Donald Trump highlighted what he called a crisis of drugs and crime (Picture: Reuters)

On Thursday, it was reported that Mr Trump had stormed out of a meeting with Senate Democratic leader Chuck Schumer and House Speaker Nancy Pelosi in a “temper tantrum” – something he denied.

Speaking on a visit to McAllen, Texas, and the Rio Grande on Thursday, Mr Trump highlighted what he calls a crisis of drugs and crime, saying he felt badly “for people that have family members that have been killed” by criminals who came over the border.

He said: “We’re either going to have a win, make a compromise – because I think a compromise is a win for everybody – or I will declare a national emergency,” Mr Trump said before departing the White House for his visit to the border.

Visiting a border patrol station in McAllen, where he viewed tables piled with weapons and narcotics, Mr Trump said: “A wall works. Nothing like a wall.”

Donald Trump talks to US Customs and Border Protection officers at McAllen International Airport as he prepares to leave after a visit to the southern border (AP Photo/ Evan Vucci)

He also announced he was cancelling his trip to the World Economic Forum in Davos, Switzerland, scheduled for later this month, citing Democrats’ “intransigence” on border security.

The partial shutdown would set a record early on Saturday, stretching beyond the 21-day closure that ended on January 6 1996, during Bill Clinton’s administration.