WASHINGTON – President Donald Trump said Friday he will not put tariffs on Mexico after all, saying it has agreed to take new measures to stop the illegal flow of migrants into the United States.

"The Tariffs scheduled to be implemented by the U.S. on Monday, against Mexico, are hereby indefinitely suspended," the president tweeted. "Mexico, in turn, has agreed to take strong measures to stem the tide of Migration through Mexico, and to our Southern Border."

Trump had threatened 5% tariffs on all Mexican imports unless officials there figured out a way to crack down on the flow of Central American migrants. While Trump praised the deal, it does not meet his most controversial demand: that Mexico agree to be designated a safe third-party country, which would have meant accepting asylum applications from thousands of Central American migrants.

On Friday evening, the State Department released a short overview of the agreement, claiming both sides will take actions to stem the flow of migrants.

Mexico will deploy its national guard throughout Mexico, in particular to its Southern border, which borders Guatemala, according to details of the agreement. In addition, Mexico has agreed to take "decisive action to dismantle human smuggling and trafficking organizations as well as their illicit financial and transportation networks."

The U.S. will "immediately expand" the implementation of an existing protocol "across its entire Southern Border" and, as a result, migrants seeking asylum at the U.S.-Mexico border "will be rapidly returned to Mexico where they may await the adjudication of their asylum claims." Mexican officials have agreed to offer jobs, health care and education to those awaiting the adjudication of asylum claims, the State Department says.

Both countries agreed to "take further actions" if the measures adopted do not result in limiting migrants seeking asylum. It is unclear at the moment what the new actions might be. It is also unclear how the U.S. and Mexico will measure results.

Mexican President Andrés Manuel López Obrador has in the past argued the migrant crisis will be solved only through economic development in Central America, not by a harsh immigration crackdown. In December, López Obrador asked the Trump administration to partner with Mexico on a Marshall Plan for Central America – envisioning a $30 billion investment over the next five years to create jobs in the region.

Secretary of State Mike Pompeo said then that the Trump administration wanted to work with Mexico to “create opportunities in the Northern Triangle (El Salvador, Guatemala and Honduras), so these people will have better lives there."

Since then, Trump has cut $450 million in foreign aid to those countries. The decision ended dozens of projects designed to bolster security, the economy, education and judicial systems – initiatives that supporters said would have improved conditions in Central America and convinced citizens not to flee to the U.S.

In the current talks, Mexican negotiators have not publicly spelled out a specific financial request, but they have made it clear they want economic investment to help address the root causes of the crisis.

“The U.S. stance is centered on immigration control measures, while our focus is on development,” Roberto Velasco, a spokesman for the Mexican Foreign Ministry, tweeted on Thursday evening.

Pompeo said the joint obligations that the U.S. and Mexico negotiated will benefit both countries.

"The United States looks forward to working alongside Mexico to fulfill these commitments so that we can stem the tide of illegal migration across our southern border and to make our border strong and secure," Pompeo said in a statement.

Trump wrote on Twitter Saturday morning that, "Mexico will try very hard and if they do that, this will be a very successful agreement for both the United States and Mexico!" He also wrote that Mexico had agreed to buy "large quantities of agricultural product" from U.S. farmers.

Economists and lawmakers from both parties had criticized Trump's tariff plan, saying it would hurt the economies of the United States and Mexico while doing little to reduce illegal immigration.

The threat unnerved investors and rankled lawmakers – including Republicans – who said it would depress trade between the U.S. and Mexico. They also noted that tariffs would make it harder for Congress to approve a proposed free trade agreement with Mexico and Canada.

Some members of Congress talked about passing legislation to block tariffs. Senate Majority Leader Mitch McConnell, R-Ky., meanwhile, asked Trump to meet with Republican lawmakers before imposing tariffs.

Republicans who had asked Trump not to hit Mexico with tariffs applauded the announcement.

“This is very good news for Texas,” said Matt Mackowiak, a Republican political consultant in that state. “Tariffs on Mexico would have needlessly harmed the Texas economy is incalculable ways. And if the Trump administration has secured meaningful action from Mexico that will reduce illegal immigration, then Trump will have pulled a rabbit out of his hat.”

More:Forget about the moon: Donald Trump says NASA should focus on 'much bigger things' ... like Mars

More:Trump calls Nancy Pelosi 'nasty, vindictive, horrible person,' after prison remark

Sen. Joni Ernst, R-Iowa, also praised the move from the Trump administration.

"Great news for Iowa farmers, and great news for our nation!" she tweeted. Ernst previously said "the livelihoods of Iowa farms and producers are at stake" as a result of the threatened tariffs.

However, Trump’s critics said he played up the tariff threat as leverage against Mexico.

Democratic presidential candidate Beto O'Rourke of Texas tweeted: "The damage of Trump's reckless trade policies and tariffs has already been done. What we see is yet another example of him trying to be both the arsonist who created this problem in the first place and the firefighter who wants credit for addressing it."

Ned Price, a spokesman for the National Security Council under President Barack Obama, also tweeted that Trump is "so predictable" and follows a "simple recipe." Former San Antonio Mayor Julián Castro, who is running for president and is a frequent Trump critic, retweeted Price's post.

Price said that the president manufactures "a crisis on an issue of importance to the base," then leaves "success undefined," pretends "to play hardball in a way that rallies the base," solves the manufactured crisis and then disguises "the status quo as a 'huge success.'"

Contributing: Deirdre Shesgreen and Rebecca Morin

Like what you’re reading?:Download the USA TODAY app for more