President Trump has threatened Mexico with a tariff on all goods shipped to the US, demanding the country stops what he says are illegal immigrants crossing the border.

Trump tweeted the plan, warning the levy could be introduced in under two weeks.

In a fuller statement issued through the White House, Trump set out plans for tariffs to continue to rise if the “crisis” over immigration from Mexico into the US “persists”.

He said: “If the illegal migration crisis is alleviated through effective actions taken by Mexico, to be determined in our sole discretion and judgment, the tariffs will be removed. If the crisis persists, however, the tariffs will be raised to 10% on July 1, 2019.

“Similarly, if Mexico still has not taken action to dramatically reduce or eliminate the number of illegal aliens crossing its territory into the United States, tariffs will be increased to 15% on August 1, 2019, to 20% on September 1, 2019, and to 25% on October 1, 2019. Tariffs will permanently remain at the 25% level unless and until Mexico substantially stops the illegal inflow of aliens coming through its territory.”

The warning surprised markets, coming seven months after the US, Canada and Mexico agreed on a new trade deal to replace the NAFTA agreement that had run since 1994.

According to data from the Office of the US Trade Representative, the value of US imports of goods from Mexico stood at US$346.5bn in 2018.

US imports of agricultural products from Mexico totalled $26bn in 2018. The USTR says “leading categories” include: fresh vegetables (some $5.9 bn were shipped from Mexico to the US last year, according to USTR data), other fresh fruit ($5.8bn), wine and beer ($3.6bn), snack foods ($2.2bn), and processed fruit and vegetables ($1.7bn).

In a letter to Trump that was posted online, Andrés Manuel López Obrador, Mexico’s president, said he did not want “confrontation” and underlined the need for talks.

Reforming NAFTA was one of Trump’s key policy aims. The United States-Mexico-Canada Agreement was signed last September but still requires ratification from legislatures in all three countries. 

To speed up the process, earlier this month Trump agreed to lift tariffs the US had placed on steel and aluminium imports from Mexico and Canada. The two countries in turn agreed to lift tariffs on US goods, including products such as apples, cheese and pork.