Donald Trump has threatened to close the “whole border” with Mexico if illegal immigration gets “uncontrollable”.

“If we find that it gets to a level where we’re going to lose control or people are going to start getting hurt, we will close entry into the country for a period of time until we can get it under control,” Mr Trump said after a Thanksgiving phone call with the US military at his Mar-a-Lago club in Florida.

“We’re either going to have a border or we’re not,” the president said after stationing nearly 6,000 US troops on the border to combat migrants crossing the border without proper documentation.

Mr Trump has been railing against a caravan of approximately 7,000 people slowly making their way towards the US-Mexico border as they flee rampant gang violence and poverty in Guatemala, Honduras, and El Salvador.

While answering questions from journalists, Mr Trump claimed he had already closed the border before and would do so again - even if meant Mexico could not sell automobiles to American customers.

The US recently signed a new trade agreement with Mexico and Canada, known as the USMCA, to replace the North American Free Trade Agreement (Nafta) and included provisions about automobile sales, but the president did not address in that moment.

Donald Trump: immigrants to 'present themselves legally' at border or void asylum claim

“Two days ago, we closed the border. We actually just closed it. We said, ‘Nobody’s coming in.’ Because it’s out of control,” the president said.

Department of Homeland Security Secretary Kirstjen Nielsen said a few traffic lanes in the port of San Ysidro near San Diego, California, had been shut down because a group of migrants “were planning to rush the border”.

The lanes were, however, opened again later that day.

Undocumented immigration across the US-Mexico border Show all 14 1 /14 Undocumented immigration across the US-Mexico border Undocumented immigration across the US-Mexico border Immigrant children, many of whom are separated form their parents, are housed in Texas' tent city Reuters Undocumented immigration across the US-Mexico border A two-year-old Honduran asylum seeker cries as her mother is searched and detained near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Undocumented migrants ride on the top of a freight train referred to as the beast, or La Bestia Getty Undocumented immigration across the US-Mexico border A cage inside a US Customs and Border Protection detention facility in Texas Reuters Undocumented immigration across the US-Mexico border US Border Patrol Academy All new agents must complete a months-long training course at the New Mexico facility before assuming their posts at Border Patrol stations, mostly along the US-Mexico border Getty Undocumented immigration across the US-Mexico border US-Mexico border fence A group of young men walk along the Mexican side of the US-Mexico border fence in a remote area of the Sonoran Desert Getty Undocumented immigration across the US-Mexico border US-Mexico border fence in the US Man looks through US-Mexico border fence into the US in Tijuana, Mexico Getty Undocumented immigration across the US-Mexico border US-Mexico border fence US Border Patrol agent Sal De Leon stands near a section of the US-Mexico border fence while stopping on patrol on in La Joya, Texas Getty Undocumented immigration across the US-Mexico border US Border Patrol Academy US Border Patrol instructor yells at trainees after their initial arrival to the academy Getty Undocumented immigration across the US-Mexico border Memorial service in Guatemala Families attend a memorial service for two boys who were kidnapped and killed in San Juan Sacatepequez, Guatemala. Crime drives emigration from Guatemala to the United States, as families seek refuge from the danger Getty Undocumented immigration across the US-Mexico border Arrests on the border Undocumented immigrants comfort each other after being caught by Border Patrol agents near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Detention holding facility A boy from Honduras watches a movie at a detention facility run by the US Border Patrol Getty Undocumented immigration across the US-Mexico border Mexican farm workers Mexican migrant workers harvest organic parsley at Grant Family Farms in Wellington, Colorado Getty Undocumented immigration across the US-Mexico border Mexican family in Arizona A Mexican immigrant family sits in the living room of their rented home in Tuscon, Arizona. The family that Arizona's new tough immigrant law had created a climate of fear in the immigrant community. Getty

Mr Trump said on Thanksgiving: "You're dealing with a minimum of 500 serious criminals [among the migrants], so I'm not going to let the military be taken of advantage of. I have no choice. Do I want that to happen? Absolutely not. You're dealing with rough people.”

No evidence has been made public that any of the migrants attempting to enter the US are actually criminals.

Support free-thinking journalism and attend Independent events

Some of these migrants are seeking asylum in the US and, per US law, must set foot on US soil in order to do so.

Mr Trump also took the opportunity at Mar-a-Lago to continue his Twitter rant about the federal appeals court in San Francisco, which ruled against his asylum policy and said the administration must allow all those seeking the protected status to apply regardless of where they came from or how they entered the country.

The court in question has blocked a number of border and immigration orders from Mr Trump during his presidency and the president had previously tweeted that "judges must not legislate security ...They nothing about it and are making our country unsafe." He said that such decisions would only lead to "bedlam, chaos, injury and death".