Donald Trump has announced he will place tariffs on all Mexican imports in a latest attempt to address a “border crisis” and crack down on illegal immigration.

A 5 per cent tariff will come into effect from 10 June and gradually increase up to 25 per cent “until the illegal immigration problem is remedied”, the US president said.

The move, aimed at controlling a wave of tens of thousands of asylum seekers, including many Central American families fleeing poverty and violence, risks devastating economic relations with the country’s biggest trade partner for goods.

“The United States will impose a 5% Tariff on all goods coming into our country from Mexico, until such time as illegal migrants coming through Mexico, and into our country, STOP,” Mr Trump wrote on Twitter.

The decision is a direct challenge to Mexican president Andres Manuel Lopez Obrador.

“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,” Mr Trump later added in a statement.

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 Obrador responded in a public letter saying “social problems are not solved with duties or coercive measures”. He also alluded to the United States’ history as a nation of immigrants. “The Statue of Liberty is not an empty symbol,” he wrote.

The legislation may threaten the United States-Mexico-Canada Agreement (USMCA), a trade deal that is currently is in the process of being updated.

“Many congressmen and senators in Mexico are going to be asking themselves whether or not they’re in a position to ratify an agreement when they have a gun pointed to their heads. So it just becomes a very complicated situation,” Juan Carlos Hartasanchez, senior director at advisory firm Albright Stonebridge Group, told CNBC.

In February, Mr Trump declared the situation on the southern border of the United States to be a national emergency, citing an “invasion” of drugs, gangs and people crossing into the country.

During his election campaign and time in office, Mr Trump has sought funds to build a wall on the border, a campaign that has been popular with his supporters.

Many experts have criticised the announcement. “The drama is legal, but it’s preposterous,” Gary Hufbauer, an expert in trade law at the Peterson Institute for International Economics, said.

Others have suggested Mr Trump may be posturing to appeal to his voter base. “This seems more theatre and tactics than a strategy to solve the migration crisis and rebalance North American trade,” Daniel Ujczo, a US-based international trade lawyer, said.