WASHINGTON (Reuters) - U.S. President Donald Trump predicted Mexico would strongly enforce a new deal under which it agreed to expand a controversial asylum program and boost security on its southern border to stem Central American migrants trying to reach the United States.

The deal, announced on Friday after three days of negotiations in Washington, averted Trump’s threatened imposition of 5% import tariffs on all Mexican goods starting on Monday.

“Mexico will try very hard, and if they do that, this will be a very successful agreement between the United States and Mexico,” Trump wrote in a tweet on Saturday morning.

The Trump administration believed the deal would “fix the immigration issue,” Treasury Secretary Steven Mnuchin said on Saturday in a Reuters interview on the sidelines of a G20 finance meeting in Fukuoka, Japan.

Mnuchin warned, however, that Trump retained the authority to impose tariffs if Mexico failed to enforce the new agreement.

Trump also tweeted on Saturday that Mexico would immediately begin buying “large quantities” of agricultural goods from U.S. farmers, who have been hit hard by his trade war with China and risked a new blow from Mexican retaliation if Trump had imposed tariffs.

It was not immediately clear whether Mexico made such a pledge. There was no mention of expanded Mexican purchases of U.S. agricultural products in the joint U.S.-Mexican declaration outlining the immigration deal.

Mexico’s President Andres Manuel Lopez Obrador praised the deal with Trump later on Saturday in the border city of Tijuana at a unity rally dedicated to maintaining friendly U.S. ties.

But while he said that on a personal level he rejects retaliation, he appeared to suggest that he might be forced to take a tougher line in the event of a future conflict.

“I can’t allow anyone to go against our country’s economy and even less so if it establishes an unjust asymmetry, unworthy of our government and humiliating for our nation,” said Lopez Obrador to big applause from a crowd of several thousand that spilled across several blocks.

TARIFFS ‘MILES AWAY’ FROM WTO PACT

Trump, a Republican, has made stemming illegal immigration a signature issue of his presidency, vowing to build a wall on the border, although Congress has refused to fund that measure. He has been frustrated by a surge through Mexico of Central American migrants seeking asylum in the United States, and has repeatedly blamed migrants who have entered the country through Mexico for crime and illegal drugs.

Senate Democratic leader Chuck Schumer reacted with sarcasm about the agreement late on Friday.

Slideshow ( 3 images )

“This is a historic night!” Schumer wrote on Twitter. “Now that the problem is solved, I’m sure we won’t be hearing any more about it in the future.”

Under the deal, Mexico agreed to the immediate expansion along the entire border of a program under which the United States returns asylum-seeking migrants to Mexico to await adjudication of their cases. The program, commonly known as Remain in Mexico, has been operating since January in the border cities of Tijuana, Mexicali and Ciudad Juarez.

The American Civil Liberties Union and other rights groups are pursuing a legal challenge to the program, which has returned to Mexico more than 10,390 people, mostly Central Americans.

Slideshow ( 3 images )

A former director-general of the World Trade Organization (WTO), Pascal Lamy, said it was understandable that Mexico had sought to extricate itself from the tariff bind, but said Mexico ran the risk of more threats from Trump in the future.

Lamy said he believed there was “absolutely no doubt” that the WTO would have found in favor of Mexico if Lopez Obrador had asked the trade body to arbitrate the tariff dispute with Trump, a process he said would have taken around two years for a definitive ruling.

“The notion that you put a tariff because there are too many people crossing the border is just miles away from any letter and spirit of the WTO agreement,” Lamy told Reuters.

The White House did not immediately respond to requests for comments about Lamy’s comments or the lack of mention of expanded purchases of U.S. agricultural goods by Mexico in the joint declaration.

In his speech on Saturday, Lopez Obrador did not cite any new commitment to buy more American farm products.

His government also agreed to take stronger measures to curb the flow of migrants, including deploying National Guard forces on its southern border beginning on Monday.

The agreement built on previous U.S.-Mexico talks held in March in which Mexico agreed to deploy National Guard forces, the New York Times reported on Saturday, citing people familiar with the talks.

U.S. border officers detained more than 132,000 people crossing from Mexico in May, the highest level since 2006. Trump threatened to keep raising import duties on Mexican goods up to 25% unless Mexico acted to stem what he has called an “invasion.”

U.S. business groups and some of Trump’s Republican allies warned that a trade fight with Mexico would hurt the U.S. economy and lobbied the administration to back down.

The deal announced on Friday did not include a U.S. demand that Mexico accept a “safe third country” designation that would have forced it to permanently take in most Central American asylum seekers.