Donald Trump said Mexico has agreed to take strong measures to stem the tide of migration through there

The United States and Mexico have reached an agreement on migration, President Donald Trump announced late Friday, with the punishing tariffs he had been threatening "indefinitely suspended."

"I am pleased to inform you that The United States of America has reached a signed agreement with Mexico. The Tariffs scheduled to be implemented by the U.S. on Monday, against Mexico, are hereby indefinitely suspended," he said on Twitter.

"Mexico, in turn, has agreed to take strong measures to stem the tide of Migration through Mexico, and to our Southern Border. This is being done to greatly reduce, or eliminate, Illegal Immigration coming from Mexico and into the United States."

Trump's announcement came at the end of three days of negotiations at the State Department, with Washington demanding a tough crackdown on Central American migrants after hundreds of thousands crossed Mexico to enter the United States in recent months.

The US president had planned to hit all Mexican imports with a five percent tariff starting on Monday -- and rising over the coming months to as high as 25 percent -- a move which could have clobbered Mexico's economy.

"Thanks to the support of all Mexicans, we were able to avoid tariffs on Mexican products exported to the United States," Mexican President Andres Manuel Lopez Obrador said on Twitter, adding that he will travel Saturday to the border city of Tijuana to "celebrate."

"Durable solution"

The deal came after negotiators met for more than 12 hours on Friday, with Mexico pledging "unprecedented steps to increase enforcement to curb irregular migration," the two sides said in a joint statement.

"The Governments of the United States and Mexico will work together to immediately implement a durable solution," it said.

Mexico will deploy National Guard troops throughout the country, "giving priority to its southern border" with Guatemala. It will also target human smuggling and trafficking groups.

Meanwhile the United States said it would start sending asylum seekers back to Mexico to wait as their applications were being processed.

"The United States commits to work to accelerate the adjudication of asylum claims and to conclude removal proceedings as expeditiously as possible," the statement said.

The Trump administration has demanded Mexico take tough action to halt the flow of hundreds of thousands of migrants fleeing chronic poverty and violence in Guatemala, Honduras and El Salvador, who are hoping to request asylum in the United States.

In recent months the migrant groups have been dominated by families with children.

The number of migrants detained or blocked at the border surged to 144,000 in May, triple the level a year earlier.

Trade partners

Trump had announced last week that, starting from June 10, a five percent tariff would be applied to all goods from export-dependent Mexico, rising by five percentage points each month to a high of 25 percent, until US demands on migrant controls were satisfied.

The move took direct aim at Mexico's economy, which is heavily dependent on trade with the United States.

The United States imports about $350 billion each year in goods from Mexico including $128 billion in automobiles, auto parts and engines, and $26 billion in agricultural products and processed foods.