WASHINGTON -- U.S. President Donald Trump has put on hold his plan to begin imposing tariffs on Mexico on Monday, saying the U.S. ally will take "strong measures" to reduce the flow of Central American migrants into the United States.

But the deal he announced Friday night, after returning from a trip to Europe, falls short of some of the dramatic overhauls pushed for by his administration.

A joint declaration released by the State Department said the U.S. "will immediately expand" a program that returns asylum-seekers, while their claims are under review, to Mexico after they have crossed the U.S.-Mexico border. Mexico will "offer jobs, healthcare and education" to those people, according to the agreement.

Mexico has agreed, it said, to "unprecedented steps to increase enforcement to curb irregular migration," including the deployment of the Mexican National Guard throughout the country, especially on its southern border with Guatemala.

Trump put the number of troops at 6,000, and said in a tweet Saturday, "Mexico will try very hard, and if they do that, this will be a very successful agreement for both the United States and Mexico!"

Mexico's president, Andres Manuel Lopez Obrador, said on Twitter that "Thanks to the support of all Mexicans, the imposition of tariffs on Mexican products exported to the USA has been avoided." He called for a gathering Saturday to celebrate in Tijuana.

Yet House Speaker Nancy Pelosi, D-Calif., said Trump's "threats and temper tantrums are no way to negotiate foreign policy," especially with "our close friend."

The State Department said Mexico is taking "decisive action to dismantle human smuggling and trafficking organizations as well as their illicit financial and transportation networks."

The agreement removes, for now, the threat of trade penalties that had elicited dire warnings from members of Trump's own party about the potential economic damage, higher consumer prices and an imperiled update to a North American trade deal.

Mexico's foreign secretary, Marcelo Ebrard, said he thought the deal struck "a fair balance" because the U.S. "had more drastic proposals and measures at the start."

But Leticia Calderon Cheluis, a migration expert at the Mora Institute in Mexico City, said the agreement is essentially a series of compromises solely by Mexico, which she said committed to "a double clamp at both borders."

Trump used social media to say he was "pleased to inform you" about the deal with Mexico and said the threatened tariffs "are hereby indefinitely suspended." He cited Mexico's commitment to "strong measures" intended "to greatly reduce, or eliminate" illegal immigration from Mexico.

It was a sharp reversal, given that earlier Friday, his spokeswoman Sarah Sanders had told reporters: "Our position has not changed. The tariffs are going forward as of Monday."

The U.S. had announced in December that it would make some asylum-seekers wait in Mexico while their cases were being processed. But this move has been plagued with glitches, including incorrect court dates, travel problems and issues with lawyers reaching their clients.

Immigration activists in the U.S. have challenged the program in court, arguing it violates migrants' legal rights. An appeals court recently overturned a judge who had blocked the program. And Pelosi expressed disappointment about what she said was an expanded policy that "violates the rights of asylum-seekers under U.S. law and fails to address the root causes of Central American migration."

Officials from the Department of Homeland Security were working to spread the program along the border before the latest blowup. About 10,000 people have been returned to Mexico to wait the processing of their immigration cases since the program began Jan. 29.

Any sizable increase may be difficult to achieve. At just the San Ysidro crossing in California, Mexico had been prepared to accept up to 120 asylum-seekers per week. But for the first six weeks, only 40 people per week were returned.

More than 100,000 migrants are currently crossing the U.S. border each month, but not everyone claims asylum and migrants can wait an entire year before making a claim.

Trump had threatened a 5% tariff on all Mexican goods entering the U.S. "until such time as illegal migrants coming through Mexico, and into our Country, STOP."

U.S. officials had laid out steps Mexico could take to prevent the tariffs, but many people had doubts that even those steps would be enough to satisfy Trump on illegal immigration, a signature issue of his presidency and one that he sees as crucial to his 2020 re-election campaign.

The 5% tax on all Mexican goods would have risen every month, up to 25% under Trump's plan, and had enormous economic implications for both countries.

Americans bought $378 billion worth of Mexican imports last year, led by cars and auto parts. Many members of Trump's Republican Party and business allies had urged him to reconsider -- or at least postpone the threatened tariffs as talks continued.

From the moment Trump announced his threat, observers wondered whether he would follow through. They noted his habit of creating problems and then claiming credit when he rushed in to solve them.

In late March, Trump threatened to shut the entire U.S.-Mexico border if Mexico didn't immediately halt illegal immigration. Just a few days later, he backed off that threat, saying he was pleased with steps Mexico had taken. It was unclear, however, what -- if anything -- Mexico had changed.

Talks in Washington had focused partly on changes that would make it harder for migrants who pass through Mexico from other countries to claim asylum in the U.S., according to those monitoring the situation. Mexico has opposed such a change but appeared open to considering a potential compromise that could include exceptions or waivers for different types of cases. The joint declaration, however, makes no mention of the issue

Trump has embraced tariffs as a political tool he can use to force countries to comply with his demands. Beyond Trump and several White House advisers, though, few in his administration had believed the tariffs were a good idea, according to officials familiar with internal deliberations. Those people had worried about the negative economic consequences for Americans and argued that tariffs, which probably would have drawn retaliatory taxes on U.S. exports, would also hurt the administration politically.

Republicans in Congress warned the White House that they were ready to stand up to the president to try to block his tariffs, which they worried would raise costs to U.S. consumers, harm the economy and imperil a major pending U.S.-Mexico-Canada trade deal .

------

Associated Press writers Zeke Miller, Colleen Long, Paul Wiseman, Lisa Mascaro, Darlene Superville and Padmananda Rama in Washington and Jonathan Lemire in Shannon, Ireland contributed to this report.