On June 8th, after days of tense immigration negotiations between the United States and Mexico, the Mexican President, Andrés Manuel López Obrador, organized a rally in Tijuana to celebrate an agreement that, he claimed, had averted a national catastrophe. Mexico would expand the terms of an existing arrangement with the U.S., called Remain in Mexico, while also dispatching the national guard to its southern border. In return, Donald Trump had agreed to suspend a round of tariffs that he’d threatened to impose on Mexican goods unless the country did more to limit the flow of migrants to the U.S. border. These tariffs “would have caused major damage to both economies,” López Obrador said; the Mexicans, in his telling, had stuck to their principles and set the American President straight.

Meanwhile, north of the border, Trump was touting the “new deal with Mexico,” as though he’d just won the upper hand. It wasn’t immediately clear whether his pronouncement was more of the usual Trumpian bluster or if, in fact, he knew something else about where the talks were headed. “We got everything we wanted,” Trump said on CNBC. “If we didn’t have tariffs, we wouldn’t have made a deal with Mexico.” When critics pointed out that the concessions he’d wrested from the Mexicans seemed modest, he groused, on Twitter, “If President Obama made the deals that I have made, both at the Border and for the Economy . . . a National Holiday would be immediately declared.” Last week, apparently still dissatisfied with the media’s response, Trump pulled a one-page document from the pocket of his suit jacket while addressing reporters on the White House lawn. It contained the details of a “secret” deal his Administration had reached with Mexico, he said, although he refused to elaborate. “With that, Trump created a shit storm in Mexico,” a former Mexican government official told me. “Everyone wanted to know whether AMLO”—López Obrador—“had disclosed the full extent of the negotiations.”

On Friday, as public criticism mounted in Mexico, the Mexican government revealed what it had been keeping under wraps. It was a “supplementary agreement” to the broader deal between the two countries in which Mexico would lay the groundwork for a policy that Trump has pursued since taking office. Known as a “safe third-country agreement,” it would allow the Trump Administration to turn away asylum seekers who have travelled through Mexico on their way to the U.S. border, on the grounds that they can pursue asylum in Mexico instead. In effect, such an agreement would outsource the U.S.’s asylum crisis to Mexico.

According to the terms of the deal, the Mexican government has forty-five days to substantially reduce the number of Central American migrants reaching the U.S. border. If the U.S. finds the results to be “insufficient,” then “Mexico will take all necessary steps under domestic law to bring the agreement into force.” Under the circumstances, it’s nearly impossible to imagine that the Trump Administration would relent after forty-five days, regardless of the progress that the Mexicans will have made by then. “We’re beginning to understand something that it took me a while to fully grasp,” Marcelo Ebrard, Mexico’s foreign minister, said last week, in Mexico City. “Today, the government of the United States thinks that there shouldn’t be any migrants who arrive [in the U.S.] at all. That is their position.”

Last month, some hundred and forty thousand migrants were apprehended at the U.S. border, the vast majority of them seeking asylum. By law, they must be allowed to make their claims to American immigration agents, but the Trump Administration has already designed a raft of measures to bar their entry. Through a policy called “metering,” it has restricted the number of asylum seekers admitted each day at official ports of entry, creating a bottleneck in northern Mexico. Last December, the Department of Homeland Security instituted the Remain in Mexico plan—known officially as the Migrant Protection Protocols—which forced asylum seekers to wait indefinitely in Mexico while their cases moved through the backlogged U.S. immigration courts. To date, some ten thousand asylum seekers have been forcibly returned to Mexico under this arrangement, and Mexican authorities expect the number to grow to more than a hundred thousand by the end of the year. In Ciudad Juárez, which has received hundreds of Central American asylum seekers each day under Remain in Mexico, the director of the city’s largest migrant shelter told the Washington Post, “the city and the state, we’re not prepared. . . . That could plunge us into a crisis.”

In theory, if not always in practice, the migrants returned under Remain in Mexico will have a chance to petition for asylum in the U.S. But, by the definition of a safe third-country agreement, asylum seekers travelling through Mexico would no longer be allowed to make their case to American authorities. By default, Mexico would become their final destination. Such a scenario would be highly controversial for legal and humanitarian reasons. For one thing, such an agreement is premised on the assumption that Mexico is a “safe” country in which migrants can seek asylum, even though the country has a well-documented history of mistreating migrants in its custody and of unlawfully turning them around at its southern border. The last few months have shown, on a small scale, what one likely outcome would be for tens of thousands of asylum seekers stuck in Mexico: a number of Central American asylum seekers in northern Mexico have already been killed and extorted by criminal cartels preying on their vulnerability. “If you’re going to pursue a safe third-country agreement, you have to be able to say ‘safe’ with a straight face,” Doris Meissner, the former commissioner of the Immigration and Naturalization Service, told me.

At the same time, there’s never been any political upside to a safe third-country agreement for the Mexican government. The Trump Administration has spent the last two years pushing for such an agreement, and two successive Mexican Presidential administrations—those of Enrique Peña Nieto and López Obrador—have refused. So what changed? It was the President’s threat of tariffs, someone familiar with the negotiations in Mexico told me. The Mexican economy contracted in the early months of 2019, and the value of the peso has recently fallen. The tariffs Trump envisioned, which would begin at five per cent but could reach as high as twenty-five per cent by the fall, are a particularly bracing prospect at the current moment. “López Obrador is thinking of his legacy and how to avoid a catastrophe for the Mexican economy,” the person said. “If those tariffs went into effect, there would be a high risk of a major economic crisis, the likes of which Mexico has not seen for at least twenty-five years.”

The sense of alarm in the upper echelons of the Mexican government apparently overshadowed the possibility that Trump might be bluffing. It would hardly be the first time Trump levelled an empty threat, and a number of Congressional Republicans strongly opposed the President’s gambit. (Tariffs on Mexican goods would hurt the American economy, too.) Part of the brazenness of Trump’s position was that it upended decades of unwritten rules for how the two countries conducted bilateral talks. “Before this, the relationship between the U.S. and Mexico was much more compartmentalized,” the person told me. “Trade and commerce were kept separate from immigration and from security. Trump arrived and everything got contaminated.” In terms of Trump’s agenda, his brash tactics seem to be working. “He created a new, unprecedented pressure,” the person added. “Mexico is in a very precarious position.”