For anyone still wondering how Donald Trump came to be the Republican Party’s nominee for president of the United States, his surprise visit to Mexico on Wednesday for a meeting with President Enrique Peña Nieto offered some clues.  It was good theater for both sides of the border.  It was also vintage Trump – seizing the spotlight and dominating the news cycle. He combines abhorrent ideas and vulgar manners with sharp political instincts.  He acts quickly, and takes advantage of opportunities. He throws political opponents completely off balance.

He is also utterly incoherent, a quality on clear display yesterday. In a joint press briefing with Peña Nieto after the meeting, Trump was relatively soft-spoken and moderate, while pressing for tighter border security to protect the US.  In fact, he sounded like Jeb Bush and Marco Rubio during the Republican primaries and, at least for a moment, seemed amenable to cooperation with Mexico.  

Later in the day, however, in a major speech on immigration in Phoenix, Arizona, Trump’s tone changed dramatically and he returned to his hardline posture, insisting that the US would build a wall on the border – which Mexico would pay for—and vowing to deport millions of undocumented migrants living in the United States. He played to a raucous crowd, shoring up the base that has propelled his improbable candidacy. It did not matter that Peña Nieto, in a tweet following their meeting, said that he told Trump that Mexico would refuse to pay for any wall.

Peña Nieto’s invitation to Trump perplexed and irritated many Mexicans.  After all, the staple of Trump’s campaign has been his promise to seal the border and deport undocumented migrants, the majority of whom are Mexican. Further, his absurd ideas have been accompanied by offensive, racist rhetoric targeted at Mexicans and Mexican-Americans.  The reaction in Mexico—across party, ideological and generational lines— has been unsparing (a recent poll reported that 4 percent of Mexicans had a favorable view of Trump, but one wonders who those people are!).   

It is unclear what Peña Nieto, whose approval level is just 23 percent, hoped to achieve with the gesture.  In all likelihood, he never imagined that Trump would accept the invitation, especially so quickly.  The only way that Peña Nieto, who has compared Trump with Hitler in the past, might have gained politically is if he had stood up to the Republican candidate publicly at the press briefing, which he failed to do.  Mexican citizens –nationalistic in general and particularly sensitive with it comes to relations with their northern neighbor—almost unanimously condemned Peña Nieto’s meek tone during his joint appearance with Trump.

Of course, as difficult as it is given Trump’s unrelenting insults, it is reasonable for the Mexican government to extend an invitation to US presidential candidates of the two major parties for talks (Hillary Clinton has also been invited), but the timing here was particularly infelicitous.  Peña Nieto, widely lauded for his political shrewdness when he first became president in 2012, has proved to be tone-deaf on a number of issues during his term. The Trump gamble is likely to be yet another example that could well result in a further drop in Peña Nieto’s poll numbers. 

For Trump, the costs are less clear, and depend on how the immigration issue plays out, including in the three debates with Clinton from now until November 8th. Trump may have burnished his “presidential image” by meeting with a foreign leader.  Despite his disparaging rhetoric against Mexico and its people, he was welcomed by Peña Nieto in a way that is usually reserved for foreign dignitaries.

In the last couple of weeks Trump may have flirted with a slight softening of his stance on immigration to attract the Latino, moderate and independent vote, but that seems to have been short-lived.  Whatever effect his Mexican trip had in tempering his tone on immigration was likely undone hours later on the US side of the border with his inflamed rhetoric and the unabashed reaffirmation of his original, militant position on immigration.  That aggressive speech may have helped Trump cement his image as an uncompromising leader. 

But the problem for Trump who, reliable estimates such as The Upshot give just a 13 percent chance of winning the presidency (though Clinton’s lead in some swing states is shrinking), is that for the general election his position on immigration – as well as an array of other issues – are way out of the mainstream for most voters.  In fact, as a result of the fiery Phoenix address some of Trump’s Latino surrogates are reconsidering their support.  

Whatever happens in the remaining days of this bizarre presidential campaign, the sad fact is that, because of the Trump phenomenon, US relations with Mexico, and perhaps Latin America more widely, have already been set back.  The problem is less government-to-government relations, or even Trump’s offensive rhetoric per se, but rather what many in the region see as the failure of US society generally to more forcefully repudiate such repugnant remarks.  Much of Latin America has seen ingrained and widespread prejudice in the United States come to the surface — and met with far too much indifference.