WASHINGTON – President Donald Trump kept American business leaders, GOP lawmakers and Mexican negotiators on a knife's edge for eight anxiety-filled days with his threat to slap an escalating series of tariffs on all Mexican imports if the country didn't address migrants coming to the southern border.

When Trump yanked back his economic ultimatum late Friday night, he seemed to walk away with a win-win: no new trade war with a major U.S. economic partner, and "strong measures" by Mexico to curb the flow of Central American migrants.

But critics say Trump avoided a political crisis of his own making – one that could have wreaked havoc on the U.S. economy and sparked a political revolt from within his own party. And it's not clear how much the agreement with Mexico will really accomplish on illegal immigration, Trump's signature issue.

"One of Donald Trump’s signature moves as president is to act as both arsonist and firefighter, taking credit for resolving pseudo-crises that he in fact initiated," Brendan Nyhan, a public policy professor at the University of Michigan, wrote in a recent post on Medium.

U.S. reaches deal with Mexico:Trump pulls Mexico tariff threat while claiming deal over migrants reached

Countdown to US-Mexico tariff deadline:Trump says there's 'good chance' a deal can be reached

He noted that Trump's threatened tariffs could have hurt his own re-election prospects in 2020, as U.S. companies and consumers absorbed increased costs of Mexican imports. The president, he said, had a strong incentive to "solve" the problem that began last week when Trump first tweeted his tariff threat.

Nyhan isn’t alone. While Republicans applauded the president and the deal, others argued he shouldn't receive credit.

Ned Price, a spokesman for the National Security Council under President Barack Obama, tweeted that Trump is "so predictable" and follows a "simple recipe."

Price said 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.'"

Senate Majority Leader Mitch McConnell, R-Ky., had asked Trump to brief Republican lawmakers before imposing tariffs. Lawmakers grew more nervous Friday after a weaker-than-expected jobs report, which some analysts said was due at least in part to the recent escalation of U.S. trade battles.

Trump's defenders say the end result – a new immigration deal with Mexico – shows the strength of the president's negotiating skills.

“President Trump’s newly-signed agreement with Mexico is great news for both our economy and our country’s border security," House Republican Whip Steve Scalise of Louisiana, declared in a statement Friday night. "Once again, President Trump has proven those who doubted him wrong by getting Mexico to step up their efforts to help us secure our southern border."

How the deal works

The agreement itself, released Friday by the U.S. State Department, is light on details, lacking specific numbers or other hard targets. But there are essentially two tangible elements:

• Mexico agreed to take "unprecedented steps to increase enforcement" along its southern border with Guatemala, where many Central Americans are crossing into Mexico on their way to the U.S. The country also said it would crack down on human smuggling organizations.

• Mexico agreed to expand a U.S. policy in which migrants seeking asylum in the U.S. will wait in Mexico for their claims to be adjudicated, something that can take months, though the U.S. said it would “work to accelerate” the process. While there, Mexico will offer jobs, health care and other services to the refugees.

More:President Trump: 'Progress' but no breakthrough with Mexico as tariff deadline looms

The resulting deal shows the Trump administration abandoned its most controversial demand – that Mexico agree to be designated as a safe third-party country, which would have meant accepting asylum applications from thousands of Central American migrants.

However, the agreement does include a trigger for another round of talks if the U.S. isn't satisfied over the next several months: “Both parties also agree that, in the event the measures adopted do not have the expected results, they will take further actions,” meaning Trump could revive his tariffs threat if the number of migrants arriving at the U.S. border doesn't go down. The president had previously threatened a 5% tariff on all Mexican imports.

The Senate's top Democrat, Chuck Schumer, mocked the agreement on Twitter, saying that since the president claimed to have solved the migrant crisis, “I’m sure we won’t be hearing any more about it in the future.”

In a statement Saturday, Schumer said the deal "is likely to have only a small impact on solving the root causes of Central American migration because many of the components are things Mexico is already doing.

House Speaker Nancy Pelosi, D-Calif., said the deal did not address the root causes of the migration crisis. And she said Trump undermined America's status as a world leader by "recklessly threatening to impose tariffs on our close friend and neighbor to the south."

Civil rights groups mount attacks

Immigration advocates said the deal could put vulnerable migrants in greater danger.

They took aim at the expansion of a program known as the Migrant Protection Protocols, which the U.S. rolled out in January to place asylum seekers back in Mexico until their claims are decided. Critics said that prevents migrants from seeking needed legal help in their asylum claim.

"This is just another chaotic, cruel and counterproductive attempt to block refugees from the United States," said Eleanor Acer, senior director of refugee protection at Human Rights First.

The groups say that Mexico is unsafe, and the country cannot be entrusted with the massive task of housing potentially thousands of migrants, given that the small number of shelters operating in Mexican border towns are already overwhelmed.

The American Civil Liberties Union vowed to continue a legal challenge it has mounted against that program.

“The Trump administration announced that it intends to further expand its forced return to Mexico policy, which has been illegal since Day 1 and has already proven to be a disaster,” Omar Jadwat, director of ACLU’s Immigrants’ Rights Project, said in a statement on Friday.

Breaking a record:Border Patrol apprehended record number of migrant families in May as Trump threatens Mexico

Asylum win for Trump:Appeals court rules Trump administration can make asylum seekers wait in Mexico for now

Halting aid over migrant flow:US cutting off humanitarian aid to Guatemala, Honduras and El Salvador

Contributing: Alan Gomez