U.S. President Donald Trump threatened to shut the border with Mexico in the coming week, if the southern neighbour failed to prevent migrants from reaching and crossing the frontier.

“If Mexico doesn’t immediately stop ALL illegal immigration coming into the United States (though) our Southern Border, I will be CLOSING the Border, or large sections of the Border, in the coming week,’’ Trump said in a series of tweets.

He said that the U.S. was losing money to Mexico, “especially when you add in drug trafficking etc’’ and therefore “the Border closing would be a good thing!’’

He also slammed Mexico, saying “they just take our money and ‘talk.’’

In his campaign for the 2016 election, Trump attacked Mexico and even accused Mexicans of being rapists and murderers, in what was widely perceived as a racist attack.

However, he has toned down some of his comments towards the country since becoming president and as the sides negotiated a new trade deal to replace NAFTA, along with Canada.

Trump’s latest broadside comes as reports say a new caravan of migrants is working its way up from Central America to the U.S.

Most new arrivals in the U.S. are not Mexicans, but transit through that country.

Mexican President Andres Manuel Lopez Obrador on Thursday conceded there is a problem, even as he pointed out that his country was not responsible for the situation.

Trump has declared a national emergency on the southern border and is using the special powers in this pronouncement to tap funds to vastly expand a wall between the two countries.