A few months ago, at Mexico City’s Auditorio Nacional, workers were cleaning up after a triumphant viewing of “L’Elisir d’Amore,” broadcast live from the Metropolitan Opera House. Outside, in the bright sunshine, Reforma Avenue was closed to traffic for a protest. Angry people gathered on the theatre steps, waving Mexican flags and hoisting effigies of Donald Trump, and then began marching toward El Ángel, a century-old monument to Mexican independence. One protester carried a placard that read “Mexico Deserves Respect.” Another held a poster of Trump with a Hitler mustache and the tagline “Twitler.” A local activist known as Juanito carried a large American flag bearing an unflattering image of Trump and the message “Enough! Gringo Racist, Full of Shit Trump, Son of Satan, You’re a Danger to the World.” Juanito said that he was prepared to take up arms against the American incursion, demonstrating his resolve by pointing out the scars of old bullet wounds.

Trump began his assault on Mexico almost as soon as he announced his candidacy for President. In a rambling speech at Trump Tower on June 16, 2015, he blamed Mexico for stealing American jobs, and for allowing its worst elements to cross the border: “They’re bringing drugs, they’re bringing crime, they’re rapists.” To solve the problem, he pledged, “I will build a great, great wall on our southern border. And I will have Mexico pay for that wall.” These ideas proved popular with Trump supporters, and rants about Mexico were soon a regular feature of his campaign events. As he sharpened his routine, Mexicans became not only rapists and drug dealers but also murderers. Trump promised to overhaul U.S. immigration policy and to deport “bad hombres” by the millions. At rallies, he asked, “Who’s going to pay for the wall?” and the crowds howled back, “Mexico!” If Mexico would not pay, he suggested, he might cancel visas for Mexicans and block migrants living in the U.S. from sending remittances back home.

In Mexico, Trump’s insults and threats have made him a figure of loathing. A poll in July found that eighty-eight per cent of Mexicans viewed him unfavorably. During the march, as protesters gathered at El Ángel to sing the national anthem, one group held up a large sign that said “Make America Hate Again.” Another brandished a Trump piñata, its mouth obscenely open in the manner of a sex doll. Yet the demonstration lacked the urgency that typifies politics in Mexico, where, last winter, rioters protesting gas prices set tires ablaze and sacked hundreds of shops. Along Reforma Avenue, pushcart venders sold ice cream, and groups of friends posed for smiling selfies. As it turned out, most of the political left had skipped the event, perceiving it as a thinly disguised rally of support for the highly unpopular government of President Enrique Peña Nieto.

Since his election, in 2012, Peña Nieto has fumbled his way through a series of scandals. He campaigned on promises to curb crime and improve security; instead, during his time in office, more than ninety thousand Mexicans have fallen victim to homicide. His government has been lambasted for a lacklustre investigation into the disappearance and presumed mass murder of forty-three teacher trainees, a crime that involved state police and, allegedly, local politicians, the military, and a drug cartel. He supported a series of exceedingly corrupt state governors, including several who became fugitives from the law. His wife struck a deal with a government building contractor to buy a multimillion-dollar house on unusually favorable terms. In 2015, the notorious drug kingpin Joaquín (El Chapo) Guzmán tunnelled his way out of a maximum-security prison, with evident official complicity. And, this summer, the Administration was accused of using spyware to target government critics.

On top of everything else, Peña Nieto made the calamitous decision, in August, 2016, to invite Trump to Mexico. On that visit, Trump, still a candidate, was treated with the pomp normally reserved for visiting heads of state. It was a victory for Trump, who seemed, at least to his supporters, suddenly Presidential. But, immediately after returning home, he humiliated his host by promising at a rally that he still planned to build the wall and to have Mexico pay for it.

The response in Mexico was furious. Enrique Krauze, a historian and magazine editor who is arguably the country’s most prominent public intellectual, wrote a column titled “Trump in Mexico: A Historic Error.” In it, he argued, “Peña Nieto should have asked for an apology for the repeated insults made against the Mexicans. . . . Not only did he not do that, he referred to Trump’s aggressions as ‘misunderstandings.’ . . . The only winner: Trump. There was just one loser: Peña Nieto. Or, better put, Peña Nieto and the Mexicans.” As Peña Nieto tried to defend his decision in interviews (“Could we have done things better? Maybe”), his approval rating plummeted, eventually reaching twelve per cent.

During Trump’s campaign, one of the chief objects of his disdain was the two-decade-old North American Free Trade Agreement, which he called “the worst trade deal maybe ever signed anywhere.” He blamed the treaty for sending manufacturing jobs to Mexico, and vowed to get Americans a better deal, or to scrap it entirely. This summer, the U.S., Canada, and Mexico began negotiations to overhaul NAFTA. Peña Nieto has little leverage, and any pushback against Trump carries the risk of losing the agreement entirely. But if he appears too cozy with Trump he risks losing support at home, and he cannot afford to lose much more. At the march, one protester’s sign chastised Peña Nieto as a vendepatria: a traitor willing to sell his own country. Another one, less decorous, said simply, “Peña, fuck your mother.”

The harshest insult that you hear from Peña Nieto’s critics is that he isn’t even running the country. In their view, the feckless President has left Mexico’s political direction mostly to his foreign secretary, Luis Videgaray. It was Videgaray who, last year, as finance secretary, persuaded Peña Nieto to invite Trump to Mexico. In the aftermath, Videgaray was forced out of office, but following Trump’s election he returned to favor and was appointed foreign secretary. He has been Mexico’s point man with the Trump White House ever since. His prominent role has earned him comparisons to Napoleon Bonaparte’s chief diplomat, Charles-Maurice de Talleyrand, who became notorious for his dubious loyalties. Still, he has remained Peña Nieto’s closest adviser. “He’s the puppet master, ” a Western diplomat told me. Luis Miguel González, the influential editorial director of the financial newspaper El Economista, agreed. “Videgaray is Peña’s Svengali,” he said. “Since his return, Peña Nieto is a President in name only; the real power is Luis Videgaray.”

Not long ago, I visited Videgaray in his private office, situated in a two-story faux-Colonial villa in Mexico City’s Polanco neighborhood. The area is popular among the city’s affluent international class: landscaped shrubbery, high-end retail, security guards everywhere. In his office, Videgaray, an efficient-looking man of forty-nine, wearing a slim-fitting suit, directed a staff of brisk young men in similar suits. He has a peak of thinning hair, intelligent eyes, and a close-cropped beard. In conversation, he adopts a no-nonsense mien, occasionally allowing himself a brief smile. Videgaray, who earned a doctorate in economics from M.I.T. (his thesis: “The Fiscal Response to Oil Shocks”), has a reputation for nerdish brilliance, and also for arrogance. A U.S. official described him as “a guy who in meetings is always seen as the smartest guy in the room. Compare that with his boss, and you’ll see there’s not a lot of, shall we say, technical expertise there.”

Videgaray was a political obsessive from an early age. At seven, he watched a televised presentation by the ruling Partido Revolucionario Institucional and was inspired by the spectacle; as a grade-school student, he led a movement demanding additional recess. The PRI was a good bet for an ambitious young man. Founded in 1929, it ran Mexico virtually without competition for seven decades. When Videgaray got involved, in 1987, the Party’s politics were turning toward neoliberalism, and his economic expertise would prove valuable. Videgaray began working with Peña Nieto in 2005, as he was campaigning for governor of the State of Mexico, the country’s most populous and politically important region. After Peña Nieto won, Videgaray became his finance secretary, and he earned praise for vastly improving the state’s fiscal situation; among other things, he helped renegotiate eighty-seven per cent of the public debt. In 2012, he oversaw Peña Nieto’s Presidential campaign, and he was strikingly effective. (A worker on the rival campaign, quoted in the magazine Gatopardo, recalled that Videgaray was “feared and hated.”) In an election that has since been the subject of intense legal scrutiny, Videgaray helped lead Peña Nieto to victory. That year, Videgaray bought a villa in an exclusive golf community from the same contractor who had built Peña Nieto’s wife’s house. (He denied any wrongdoing, pointing out that he had arranged the purchase while he was out of government.)

Videgaray’s current influence has less to do with his financial or electoral acumen than with his friendship with Jared Kushner. The two met during Trump’s campaign, and they have worked closely behind the scenes to ease tensions between their bosses, like consiglieres for competing Mafia families. “Jared and Videgaray pretty much run Mexico policy,” the U.S. official told me earlier this year. “It’s all pretty much just between them. There’s not really any interagency relationships going on right now.” In the State Department, he explained, career diplomats were no longer kept informed: “U.S. officials sometimes learn the latest not from their own agencies but from their Mexican counterparts—especially Videgaray.”

A senior White House official told me that Kushner was introduced to Videgaray by a close friend, who saw an opportunity to “change the dialogue a little bit” between the U.S. and Mexico. Videgaray and Kushner met twice as they worked together to arrange Trump’s visit to Mexico. With local opinion strongly against Trump, the official said, the invitation was “very courageous,” but also “a brilliant act of foresight.” To avoid antagonistic press, they decided to hold the visit without announcing it in advance, and the Trump campaign was impressed by Videgaray’s organizational skill and by his circumspection. “There are a million ways they could have screwed us,” the official said. “Luis proved to be honorable.” As he and Kushner negotiated statements to be read at a joint press conference, they found common interests, the official told me. Videgaray pointed out that Mexico had its own concerns about migrants and drugs crossing its southern border; he agreed with Kushner that updating NAFTA’s provisions could be a “win-win” for their countries.

When Videgaray resigned, amid outrage over Trump’s visit, Trump tweeted, “Mexico has lost a brilliant finance minister and a wonderful man who I know is highly respected by President Peña Nieto.” In a follow-up tweet, he wrote, “With Luis, Mexico and the United States would have made wonderful deals together—where both Mexico and the US would have benefitted.” In Mexico, this only increased the perception that Videgaray was “Trump’s guy.” But he and Kushner continued to meet, and, in December, Kushner arranged for him to join Trump on the golf course—never mind that Videgaray does not play golf. (Videgaray denies this meeting.) His evidence of loyalty contributed to a close relationship, in which, the White House official said, direct access could “short-circuit long, protracted decisions.”

Videgaray, though, has often been made to remember that Trump campaigned on a promise of America First. Soon after the Inauguration, he and Mexico’s economy secretary, Ildefonso Guajardo, flew to Washington to meet their new counterparts. Not long after they landed, they learned that Trump had issued one of his first executive orders, calling for the construction of the border wall. Despite the insult, the officials decided to stay; Peña Nieto was due to join them the following week, and preparations needed to be made.

That day, Kushner took Videgaray to see Trump in the White House. Their goal, reportedly, was to persuade Trump to moderate a speech about the wall that he was intending to give in a few hours; they argued that it was “no way to begin” his relationship with Mexico. (Videgaray denies this.) Trump assented, and in his speech he included some language devised by Videgaray and Kushner, avowing that “a strong and healthy economy in Mexico is very good for the United States.” The Mexicans hoped that they were making progress—but then, in a televised speech, Peña Nieto politely reiterated that Mexico would not pay for the wall.

The next morning, Videgaray was back at the White House, meeting with Administration aides, when, from across the hallway, Trump tweeted, “The U.S. has a 60 billion dollar trade deficit with Mexico. It has been a one-sided deal from the beginning of NAFTA with massive numbers of jobs and companies lost. If Mexico is unwilling to pay for the badly needed wall, then it would be better to cancel the upcoming meeting.” Videgaray immediately stopped the meeting and reached out to Peña Nieto, who soon responded with his own tweet, saying that he was cancelling his visit. Trump had been in office for six days, and he had already sent the U.S. relationship with Mexico into a tailspin.

In a press release intended to end the discord, the White House said that Trump and Peña Nieto had set aside their differences in an amicable telephone call. In fact, according to a transcript of their conversation published by the Washington Post, Trump repeatedly threatened to impose a border tax on Mexican goods, and even to engage in a trade war, in order to comply with his campaign promise to bring back American jobs. “I have been given as President tremendous taxation powers for trade and for other reasons—far greater than anybody understands,” Trump said. “I would love if you want to reinstitute the meetings between Luis and a staff that I will assemble in the United States. . . . They are dealmakers.” But, he added, “if we cannot work a deal, I want to tell you we are going to put a very substantial tax on the border.” Trump then turned to the funding of the wall. “We are both in a little bit of a political bind, because I have to have Mexico pay for the wall—I have to,” he said. “I have been talking about it for a two-year period, and the reason I say they are going to pay for the wall is because Mexico has made a fortune out of the stupidity of U.S. trade representatives. They are beating us at trade and they are beating us at the border, and they are killing us with drugs. . . . If you are going to say that Mexico is not going to pay for the wall, then I do not want to meet with you guys anymore, because I cannot live with that.”

In February, Videgaray met in Mexico City with John Kelly, at the time the Secretary of Homeland Security, and Secretary of State Rex Tillerson, whom he praised as “men of a great level.” He told me, “We had a work meeting, and I mean a real work meeting, making some positive steps. Then, when we were headed to our joint press conference, I was handed a telephone showing me that President Trump had said he was going to militarize” the deportations of Mexicans.

At the press conference, Kelly attempted to soothe concerns. “There will be no, repeat, no mass deportations—everything we do in D.H.S. will be done legally and according to human rights and the legal-justice system of the United States,” he said, adding, “There will be no use of military forces in immigration.” He added a conciliatory note: “Between the Mexican officials and the American officials, there’s a friendship and an air of coöperation that has to be seen to be believed.” Videgaray, grim-faced at the lectern, noted that it was a “complex moment” in the relationship between the two countries.

Trump’s outbursts, meant to force Mexican officials to work with him, seemed instead to increase the pressure on them to resist. “Mexico is demanding a strong position from us,” Videgaray said. “Many people feel it would be better if we broke with the government of the United States.” But was it worth destroying the economy to satisfy the national honor? “We have to keep ourselves focussed on our interests,” Videgaray said. “Beyond all the rhetoric, there are the interests.”

The Mexican observers who tell you that Videgaray is the current Administration’s puppet master will also tell you that the puppet master’s master is Carlos Salinas de Gortari, a pervasive and mysterious presence in Mexican politics. “If Mexico is a mathematical equation, no one knows the true value of the x of Salinas,” Luis Miguel González told me. Salinas was President from 1988 to 1994, and his term was both eventful and controversial. He is remembered for sponsoring the creation of NAFTA, and also for attracting a gaudy string of criminal accusations. His anointed successor, Luis Donaldo Colosio, was assassinated on the campaign trail, and a few months later Salinas’s former brother-in-law, the PRI’s secretary-general, was murdered in Mexico City. Many Mexicans suspected Salinas of orchestrating the killings, but he was never charged; instead, after he left office, his brother, Raúl Salinas, was convicted of murder and sentenced to a long prison term.

Carlos Salinas fled the country, claiming that he and his family were being persecuted, and spent most of the next four years in Havana, Dublin, and London, before returning to Mexico in 1999. Now in his late sixties, Salinas is widely credited with helping mastermind Peña Nieto’s rise to power; his Administration also gave Videgaray a position in the finance ministry, a job that he has described as formative. Salinas is extremely wealthy and retains tremendous influence in the PRI, with his niece, Claudia Ruiz Massieu, serving as the secretary-general.

Salinas’s home in Mexico City is situated on a quiet street, in a closely guarded residential estate. He received me one morning in his library, a two-story room outfitted with oak bookshelves and an exquisitely embossed saddle on a mount—Salinas is a keen horseman. The walls were hung with photographs showing Salinas with an array of world leaders, including George H. W. Bush, Bill Clinton, Pope John Paul, and Fidel Castro.

Salinas told me that he viewed Trump as “an American throwback.” When I asked what he meant, he explained, “We’re finally able to see what the United States has always really been, a plutocracy and a military force with an ideological core.” The U.S., he went on, had never truly reconciled the two sides of the Civil War—those who favored slavery and those who opposed it. “Sure, the U.S. has always tried to present itself as a cradle of liberty,” he said. “But it has always been a fractured land, and that’s showing today in its attitudes toward Mexican immigrants.” Trump’s Presidency, he said, represented the concerns of white citizens afraid of being outnumbered by Latino immigrants—“a last-ditch effort by a European-American group to institute the regulatory changes necessary to allow them to hold on to power for another generation.”

Salinas and his allies, of course, are waging their own fight to hold on to power. The next Presidential election in Mexico is scheduled for July, 2018, and, despite the widespread contempt for Peña Nieto, the PRI still hopes to win. To a great extent, the outcome will depend on how the current government meets the challenge from Trump—and particularly on the handling of NAFTA.

American voters tend to assess NAFTA based on its effects on the job market during the past two decades. Mexicans, or at least those who oppose NAFTA, see it as a continuation of an oppressive relationship that dates back at least to the start of the Mexican-American War, in 1846. In that conflict, known locally as the United States Intervention in Mexico, a trumped-up border dispute in Texas ended with U.S. soldiers occupying the capital and forcing the government to sign over half of the country’s territory. After the Mexican Revolution began, in 1910, the U.S. Ambassador helped over-throw Mexico’s President, who was promptly assassinated, intensifying a bloody civil war. In 1914, when Mexican authorities briefly detained nine American sailors, Woodrow Wilson ordered the Marines to invade the port city of Veracruz, which they held for six months. In Mexico, these incidents can seem as relevant to the current negotiations as foreign-exchange markets do. “Mexicans live their history every day,” Roberta Jacobson, the U.S. Ambassador, told me.

NAFTA went into effect on January 1, 1994, and was greeted by an armed revolt: Zapatista fighters, their faces covered with bandannas and balaclavas, seized a series of towns in Chiapas. The Zapatista leader Subcomandante Marcos called the trade alliance a death sentence, arguing that it would destroy Mexico’s rural economy, force dependency on American imports, and increase the disparity between rich and poor. Twenty-three years later, Mexico’s economy has been transformed, especially in the north, and a new middle class has emerged. But a number of the Zapatistas’ assertions have been borne out. The agricultural sector, centered in the mostly indigenous southern regions, has been devastated. Towns and villages that relied on the sale of produce have seen their markets collapse, and many have fallen into surging criminal economies imposed by drug cartels. At the same time, Mexico has become utterly dependent on the U.S. for economic viability. Several people I spoke to pointed out a particularly painful absurdity: even as farming communities struggle, the country imports corn from the U.S. The prominent journalist Alejandro Páez Varela spoke bitterly of Mexico’s reliance on the U.S.: “It’s made us one of the most obese people on earth, because we are now mass consumers of American junk food. It has created a class of superwealthy, consisting of a couple of dozen people who are closely linked to political power. It’s created fifty-three million very poor people for whom the only solution is to emigrate, en masse, to the United States and send remittances home.”

Partly as a result of this economic interdependence, Mexico’s traditional anti-Americanism had mostly died down in recent years. But Trump’s threats of deportations and taxes on remittances have brought anxiety to millions of poor Mexicans who work in the United States, and to the millions more who depend on their earnings. Enrique Krauze, the historian, said that he was outraged by Trump’s fearmongering. “At the level of popular culture, you can find Trump piñatas and masks and fun made of him, but I think that among ordinary people there is mostly perplexity and worry—and it’s obvious why,” he said. “This completely unexpected aggression was a real shock. The memory of the problems between Mexico and the United States belonged to the remote past—prehistoric! Above all, because the U.S.-Mexico relationship has changed so much. Mexico has Americanized in so many ways. Everyone is travelling, consuming, speaking English, listening to the same music.” Krauze told me that Mexico’s “low-key response” to Trump had left him ashamed. “There is a very real sense here that the United States is el gigante—the giant—which crushed us several times and may do so again.”

Vicente Fox, who served as President for the National Action Party, or PAN, from 2000 to 2006, has been the most outspoken of Mexico’s senior politicians—perhaps because Mexican Presidents are limited to one term, and so he has little to lose. In a recent video satirically announcing that he would run for President of the United States in 2020, he derided Trump’s legislative record. “Donald, you suck so much at this job,” he said. “If they ever do a Mt. Rushmore for shitty Presidents, it will just be your bloated, orange head—four times.” Among current Mexican officials, almost everyone I met offered commiserations about Trump, and many suggested that he was a bigot and a dangerous, reckless man. One went so far as to fantasize about the possibility that “Trump might end up like J.F.K.” But for most the guiding principle was circumspection.

When I asked Salinas what strategy he recommended, he said, “The problem is, there isn’t yet enough clarity coming from his government to know how to formulate a policy. For that reason, today more than ever, it is necessary to recur to the second most important of Plato’s virtues: prudence. The first, of course, was justice.” Salinas’s advice appeared to have been adopted as policy. A PRI senator, Marcela Guerra, told me that she had been summoned to a private Party meeting to discuss the Trump phenomenon. “At the meeting,” she said, “Peña Nieto asked us to have patience and prudence.”

Mexicans cherish the tradition of Mexico bravo—the historical ideal of their country as indomitable—and Salinas seemed pained to let it go. “What one would really like to tell Trump is what the placards say on the backs of buses in Acapulco,” he said. He called for his secretary to bring him a newspaper photograph of a bus bearing an image of Trump and the message Somos mexicanos y tu madre te mentamos. (“We’re Mexicans, and we say fuck your mother.”) Salinas laughed. “Popular expressions such as these are welcome, but the authorities must be contained in their responses.”

In the NAFTA negotiations, he said, “the key will be to know when to make the leg hard, as soccer players say. The thing we know about Trump is that he always has to win. So we have to figure out how to let him think he’s won, when we are actually the winners. But we also cannot appear to be losers in front of the Mexican people.”

Ildefonso Guajardo, who helps lead the NAFTA negotiations, spoke with officious confidence about working out agreeable terms with the Americans. White House officials had hinted that they preferred renegotiating the trade agreement to jettisoning it, and he said that it was a relief to see some “level heads” on the American side. But, after some prodding, Guajardo echoed concerns about the damage Trump had done to Mexican-American relations. He spoke of an N.F.L. exhibition game held in Mexico City which had prompted a heated debate over whether to play the U.S. national anthem. In the end, Guajardo said, the anthem had been played, but the fact that the debate had even taken place revealed a new animosity. I asked Guajardo if he felt personally offended by Trump, and he replied, “As Mexico’s secretary of economy, I do not have the luxury of being insulted. But as a Mexican, yes, I am, deeply so.”

When I asked whether he would seek redress for the ruined agricultural sector, he demurred. Instead, he named other areas where he saw possible breakthroughs: energy, telecommunications, and e-commerce, all of which have changed radically since the regulations were drafted, in the early nineties. He suggested that it was to Mexicans’ advantage to limit the scope of negotiations. “If you put the patient on the operating table without knowing exactly what your intervention is going to be about, it can be a mess,” he said. “If it’s a free shot for anyone who wants to get their hands on this guy”—he laughed—“we will end up killing NAFTA.”

Videgaray was similarly restrained. When I asked how Mexico planned to proceed, he said, “When we get some good news, we should regard it as a small piece of good news, and when we get a tweet or a threat, we should consider it a small tweet or threat. We can’t allow our positions and actions to be overly influenced by what happens day to day. We have to be supremely patient. ” The Mexicans’ greatest obstacle may be Trump’s unorthodox economic ideas. He is obsessed with the trade deficit, which last year, according to U.S. government figures, came to fifty-five billion dollars, out of a total trade relationship worth nearly six hundred billion. “Trump doesn’t stop talking about it,” the Western diplomat said. “He asks everyone [in the government] who has to do with Mexico about the deficit, and whether they’ve gotten it down.” Gary Clyde Hufbauer, of the Peterson Institute for International Economics, told me, “Most of us in trade economics disregard deficit as a metric to measure the worth of a trade agreement. President Trump’s thinking is very simple, and comes from a concept called mercantilism,” a protectionist doctrine that has been assailed by economists since Adam Smith. “He is also a physiocrat, which means that services don’t count. The U.S. has a very large surplus globally in services. But, if you can’t see it and kick it, it doesn’t count for him.”

Mexican officials know that their negotiating position is not strong. José Antonio Meade, the finance secretary, met me in his grand office at the national palace, and presented a litany of statistics to demonstrate that NAFTA was as good for Americans as it was for Mexicans. “I hope we can get away from the noise, and that the Trump Administration can see that Mexico is not part of the problem but the solution,” he said. Trump seems unmoved; in a recent speech in Arizona, he said, “I think we’ll end up probably terminating NAFTA.”

Videgaray and his colleagues have only a couple of threats to make in response. One involves China. In a recent interview, promoted on the government’s Web site, he spoke of increasing trade with Asia, Latin America, and Europe, as part of an unprecedented effort to “expand our exports and the investment we receive from other latitudes.” This September, he and Peña Nieto travelled to China, looking for investment partners. The other threat is that Trump’s belligerence will encourage open revolt in Mexico—that, if the economy collapses, the mild-mannered protesters I saw on Reforma Avenue will give way to a new generation of post-Zapatista revolutionaries. When I spoke to Salinas, he said, “Trump has no idea of what a destabilized Mexico would be like. We don’t want that for Mexico, either. But this sorcerer’s apprentice can unleash forces that . . . he just has no idea.”

In the campaign for next year’s Presidential election, the current polling leader is a left-of-center populist named Andrés Manuel López Obrador. López Obrador, who was Mexico City’s head of government from 2000 to 2005, narrowly lost the 2006 Presidential election, and for months afterward he encouraged mass protests, centered on a tent city erected in the capital. He has reëmerged with a new party, the National Regeneration Movement, or MORENA, founded to dispel “the neoliberal model” and to seek “the democratic transformation of the state.”

López Obrador’s rivals depict him as a demagogue who would create the same chaos in Mexico that Hugo Chávez did in Venezuela. Krauze, who once criticized him as a “tropical messiah,” told me that he regards him as an ideologue with authoritarian leanings. López Obrador is unusually law-abiding for a Mexican politician, but Krauze did not find that reassuring. “He is not corrupt—but ostentatiously so,” he said. “He has a saint’s complex, and that, I think, would be very dangerous.”

López Obrador’s defenders claim that he has moved closer to the political center, pointing out that, in Mexico City, he teamed up with the communications magnate Carlos Slim on urban-regeneration schemes. A longtime adviser, Ricardo Monreal, told me, “He’s a different politician today. He’s been talking with the private sector and the military, and they’re fine with him.” Nevertheless, Peña Nieto’s government has used López Obrador’s ascent to stoke anxiety. Mexican officials have warned White House aides that Trump’s behavior could help make the forthcoming election a referendum on which candidate is the most anti-American. López Obrador, they suggest, would be bad not just for business but for security, too, allowing a new influx of “bad hombres.”

The Western diplomat recalled advising the U.S. Administration not to overreact; when John Kelly declared, last April, that a leftist government in Mexico would “not be good for America or for Mexico,” López Obrador’s poll ratings shot up. Monreal acknowledged that the standoff with Trump contributed to López Obrador’s new appeal. “While this government has been paralyzed in the face of the Trump challenge, vacillating and lukewarm, López Obrador is seen as a man with character, someone who can negotiate on behalf of Mexico,” he said. In June, López Obrador published a book titled “Listen, Trump,” in which he accuses the President of stirring up “Hispanophobia” and castigates Peña Nieto for failing to represent Mexico “with dignity.”

Luis Hernández Navarro, a columnist for the left-of-center daily La Jornada, argued that many of Mexico’s problems result directly from “the wholesale adoption of the American model by the country’s élites.” Yet the future of this complicated Mexican-American fusion has been thrown into doubt. “For twenty-five years we’ve been told we’re North Americans,” he said. “But now they’re saying, ‘No, actually, you’re not members of the club.’ ”

Hernández hoped that Trump might turn out to be a blessing in disguise, obliging Mexicans to see the need for a “new national compact” that seeks renewal through greater economic sovereignty. López Obrador has picked up on some of these ideas in his Presidential campaign, but he has not gone far enough for Hernández, who intends to support a candidate backed by the Zapatistas and the National Indigenous Congress, a fifty-three-year-old indigenous woman named María de Jesús Patricio. Patricio, a traditional healer by profession, has called for Mexicans of all kinds to “join forces in order to destroy this system that is generally finishing us all off.”

As the NAFTA talks were getting under way this summer, Videgaray made amelioratory gestures. He looked for goods that Mexico imports from various countries which could be bought instead from U.S. producers. And, in a break with Mexico’s tradition of diplomatic nonintervention, he supported a regional initiative aimed at isolating Venezuela’s socialist government. In response, Venezuela’s foreign secretary blasted him as “vile” and accused him of subservience to the United States. (When I asked Videgaray about this, he gave a wry look and said, “The Venezuelans are colorful.”) In September, Mexico expelled the North Korean Ambassador after his country held nuclear tests. “It was a great way to show good will and solidarity,” the senior White House official said. “The President really appreciated it.”

Trump’s appreciation tends not to last, though, and analysts on both sides suggested that negotiations could be scrapped at any moment. “I think Trump is confident that Jared will deliver him a good result in the end—but if not he’s willing to go with the nuclear option,” Duncan Wood, the director of the Wilson Center’s Mexico Institute, told me. The Mexican negotiators’ best hope may be to use American concerns about chaos in Mexico to force an advantageous deal, which includes both security and the economy. But if they consent to separate agreements on the issues that are of greatest interest to the United States—narco-trafficking, money laundering, counterterrorism, and immigration—they may have no leverage left for trade.

The government’s critics say there is no leverage left, anyway. One of the country’s most redoubtable politicians, Porfirio Muñoz Ledo, formerly a president of the PRI, a secretary of labor, and an Ambassador to the E.U., told me bluntly, “Why is this government so weak? Because we have completely surrendered to the United States through NAFTA.” Muñoz Ledo argued that Mexico should have more vehemently opposed Trump. In similar circumstances, he said, Nelson Mandela would have had the moral authority to speak out against a border wall. “Unfortunately,” he said with a grimace, “Mexico doesn’t have a Mandela. It only has a Peña Nieto.”

Whatever Videgaray can find to appease Trump probably won’t be enough, Marcelo Ebrard, a popular former Mexico City mayor, predicted. “Trump needs a victory, and he will not let this NAFTA opportunity slip by. I can’t see it going well for Mexico under any circumstances. But, no matter what happens, Videgaray is bound to come out afterward and put the best face on things. Like a man who has had a leg amputated during surgery, he’ll say, ‘It didn’t go so badly—we could have lost both legs!’ ”

In September, just after NAFTA negotiators met in Mexico City, I went back to see Videgaray at his office. He seemed relieved that, for the moment, relations between his country and the U.S. were going through normal channels—that “the interests” were being handled by qualified experts. “Jared Kushner remains a very important person in the relationship, and a very helpful and positive force,” he said. But, he added, there is now “a much more professional management style.” Videgaray had been visiting Washington and talking to legislators about the consequences for their constituents if NAFTA collapsed. “We’re getting tremendous support from both sides of the aisle,” he said. Senators from several agricultural states had signed a letter reminding negotiators that NAFTA had led to “tremendous growth in U.S. trade.” As Videgaray and his envoys dealt with U.S. institutions, rather than with Trump, things seemed less dire. “We went from panic to concern,” he told me.

But the institutions might not ultimately decide the outcome. “It may not matter what the negotiations come up with,” Wood told me. “It just matters if Donald Trump says it’s a great deal. That’s where the anxiety is coming from. Having worked in international relations for twenty years, I never thought we’d get to the point where one person could come along and blow everything up. But here we are.” ♦

This article appears in the print edition of the October 9, 2017, issue, with the headline “Boundary Issues.”

Jon Lee Anderson, a staﬀ writer, began contributing to the magazine in 1998. He is the author of several books, including “The Fall of Baghdad.”