Mexican President Andrés Manuel López Obrador, left, listens to Foreign Minister Marcelo Ebrard at a news conference in Mexico City on Monday. (Alfredo Estrella/AFP/Getty Images)

The deal that led to President Trump’s calling off his threat to impose tariffs against Mexico has led to a peculiar debate. Did Mexico manage to talk its way out of a trade war by selling Trump on a series of actions that the administration of President Andrés Manuel López Obrador had planned on implementing anyway? In other words: Did Trump get played?

Some have suggested as much. They are wrong.

It’s true that some measures in the agreement are not entirely new. The Mexican government had indeed planned to deploy the country’s Federal Police to a number of municipalities in southern Mexico before the Washington deal was on the table. It’s also a fact that Mexico was already cooperating with the Trump administration’s controversial “Remain in Mexico” policy before the tariff threat.

But make no mistake: The bullying has borne fruit.

After months of ignoring Trump’s provocations, López Obrador reacted instantly to Trump’s shakedown. Mexican officials, led by the influential foreign minister, Marcelo Ebrard, hurriedly headed to Washington. Ebrard took to Twitter to record every step of the process, including posting photographs of the Mexican delegation preparing for the week’s talks, huddled for a showdown. When the meetings finally took place, Mexico agreed to a number of resolutions of extraordinary scope and urgency.

During a news conference Tuesday, Ebrard said 6,000 National Guard troops would begin deployment along 13 crucial areas in southern Mexico as early as this week. He hopes this display of “strength, presence and regulation” will help Mexico drastically reduce the number of Central American migrants crossing the country on their way to the United States.

Although the previous government of President Enrique Peña Nieto also carried out a strategy in line with Trump’s punitive demands, this kind of deployment of Mexico’s forces is exceptional.

A top-level Mexican diplomat who was involved in the Washington talks told me that Mexico’s government had originally planned “to deploy half as many troops. We have doubled the number and accelerated the process.” This, he said, far exceeds the previous plan, agreed to by Mexican Secretary of the Interior Olga Sánchez Cordero and then-Secretary of Homeland Security Kirstjen Nielsen, to send hundreds of Federal Police officers along certain checkpoints in southern Mexico.

This aggressive approach is a dramatic about-face for López Obrador, who had vowed to focus on regional development and humanitarian relief rather than enforcement.

Mexico is becoming the wall.

The expansion of the “Remain in Mexico” policy is also controversial. Before Trump’s bullying, the Mexican government had restricted the extent of Mexico’s cooperation with the program, consenting to the return of a limited number of potential Central American refugees through only three checkpoints along the border. Now Mexico’s responsibility in the highly divisive program has grown exponentially. It will now take in Central American immigrants at six points of entry along the border. Per the agreement, Mexico will open its doors to “all” refugees the United States decides to send back to await the resolution of their asylum process, which could take years given the substantial immigration court backlog in the United States.

The agreement goes even further. Mexico is supposed to provide refugees with education, health care and employment. This could easily lead to an even more serious humanitarian crisis. Mexico is already struggling to accommodate at least 10,000 potential refugees who have been sent south of the border in the past six months. With Mexico’s recent acquiescence, the number could explode. This, again, goes far beyond anything the Mexican government has agreed to or attempted in the past.

The emergency has also led the López Obrador administration to overhaul its chain of command and adjust its budget. On Tuesday, he revealed a special government commission to deal with the crisis. Run by Ebrard, the group includes personnel from at least four different government ministries. Mexico is also planning to add resources to COMAR and INAMI, the agencies entrusted with refugee protection and immigration, both of which operate on absurdly low budgets. COMAR’s allocation for 2019 is just under $1 million to process and shelter thousands of refugees (the DHS 2019 budget for housing Central American refugees calls for $2.8 billion). According to interior undersecretary Alejandro Encinas, both agencies will soon receive robust increases.

This sense of urgency is reasonable. The agreement with Washington gives López Obrador 45 days to show progress. If Mexico fails, it could face two possible outcomes, both dire.

On Tuesday, Trump showed the media a folded piece of paper that apparently outlined the so-far secret consequences of failure for Mexico. Ebrard denied there was a secret part of the deal, but acknowledged that consequences were part of the arrangement with Washington. What Trump calls “phase two” of the deal will be nothing less than an ultimatum. If the plan fails to reduce the number of Central American immigrants apprehended along the southern border of the United States, Mexico will likely have to set in motion some version of a “safe third country” agreement, something the Trump administration has sought. If it resists, Trump will once again bully Mexico with tariffs.

Despite the odds, Ebrard seems confident. “If there is a reduction, we will be proven right,” he said during Tuesday’s news conference. “Mexico is open to negotiations if we fail. But we are not going to fail."

In the short term, he could be right. Migration numbers fall during the summer. What happens after that might put Mexico, and Andrés Manuel López Obrador, in a much more difficult position.

Read more:

León Krauze: The U.S. push to designate Mexico a ‘safe third country’ for refugees is a farce

Jennifer Rubin: Trump’s trade war ‘victory’ isn’t fooling anyone

Carla A. Hills: You can’t stop migrants with tariffs

Fareed Zakaria: Trump is destroying three decades of hard work with Mexico