"The United States will immediately expand the implementation of the existing Migrant Protection Protocols across its entire Southern Border", the two countries said in a joint declaration following three days of talks.
Asylum seekers who cross into the USA will be quickly returned to Mexico where they'll wait for their claims to be resolved.
Trump, who ran for president pushing a tough line on immigration that included denouncing undocumented Mexicans as rapists, had vowed to raise tariffs as high as 25pc unless Mexico - which exports $350 billion in goods each year to the U.S. - takes further action against migrants.
"President Trump undermined America's preeminent leadership role in the world by recklessly threatening to impose tariffs on our close friend and neighbor to the south [.] Threats and temper tantrums are no way to negotiate foreign policy", Pelsoi said in a statement, cited by Fox News.
"We now have an agreement that we believe is going to fix the immigration issue".
The president has escalated his trade war despite opposition from the US Chamber of Commerce and other conservative business and agricultural groups.
Phil Neville's England are motivated, fresh and fearless
Germany are also serious contenders and they open their campaign on Saturday when they play China in Rennes in Group B . Spain play South Africa later in Le Havre in the same group before Norway and Nigeria clash in Reims.
"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 USA on Monday, against Mexico, are hereby indefinitely suspended", Trump wrote on Twitter shortly after returning from a trip to Europe. He said he was satisfied with the deal.
Mr Lamy said it was understandable that Mexico had sought to extricate itself from the tariff bind, but noted it ran the risk of facing more threats from Mr Trump in future.
The American flag may be flying on US embassies around the globe, but you won't find a rainbow flag hanging with it.
The asylum program to be expanded is commonly known as Remain in Mexico, and now operates in the border cities of Tijuana, Mexicali and Ciudad Juarez.
While a federal judge ruled to halt the policy, a USA appeals court overturned the decision, allowing the policy to continue as the legal challenge is ongoing.
An official stressed, though, that Mexico had agreed to do more now than they have in the past.
He had threatened to implement import duties of 5% unless Mexico stemmed the flow of migrants arriving at the United States southern border.
USA and Mexican officials discussed a deal calling for Mexico to sharply increase patrols of its border with Guatemala to curb migration, The Washington Post reported, with the deployment of 6,000 National Guard troops.