The spin started almost as soon as Donald Trump exited the Salon Adolfo López Mateos in Mexico’s presidential palace, where he capped a press appearance with Mexican President Enrique Peña Nieto with the words, “We didn’t discuss payment of the wall. That will be for a later date.”

Peña Nieto’s office tweeted after the Wednesday encounter that the president told Trump behind closed doors that Mexico was never going to pay for a border wall, while his press office says they proceeded to talk about other issues, with Trump not bringing up his pet project again. The war of words continued online with Trump exulting on Twitter that “Mexico will pay for the wall!” after a rally on immigration issues in Arizona—where appeared the opposite of the pleasant, polite person he had been south of the border, where he called Peña Nieto a “friend” and Mexicans “amazing”. Peña Nieto tweeted back Thursday afternoon: “I repeat what I said personally, Sr. Trump: Mexico would never pay for a wall.” (He later said in a presidential blog post that he invited Trump to Mexico “because there are things that he should know directly from the president of Mexico.”)

But many Mexicans missed the nuances of the message from their president. Most had hoped for tough talk from Peña Nieto at the press conference, especially in the presence of a man seen by some historians as the biggest threat to the country since ex-president James Polk, who launched the Mexican-American War of the 1840s on spurious grounds and ended up seizing most of Mexico’s northern territory, including California, for America. Here was, after all, a foreign presidential candidate who has called their compatriots in the United States “rapists” and “criminals” and who threatens to throw Mexico into a world of economic hurt by cutting off commerce with protectionist policies and a border wall.

Instead, what they got was their president characterizing Trump’s caustic comments as mere “misunderstandings”.

“It was a grave error to have received him because nothing for Mexico has come from that reunion. Instead we did a little show for him, which [Trump] politically capitalized on,” said Armando Regil, the founder of Instituto de Pensamiento Estratégico Ágora, a think tank focusing on issues for young people. “He came to use Mexico and the president to try to rebound in the polls, but he continues being the same: crazy, racist, anti-immigrant and anti-Mexican.”

Peña Nieto arrived at the press conference as the most unpopular president in modern Mexican history—with his approval rating registering a scant 23 per cent, according to the newspaper Reforma—the product of conflict-of-interest scandals, an underwhelming Mexican economy, and an aloof response to the 2014 attack on 43 teacher trainees. This showing surely didn’t help: Indeed, a poll in Reforma—one of the few print outlets openly critical of Peña Nieto—found 85 per cent thought that the Trump invitation was “an error.” The newspaper on Thursday ran the headline, “Trump uses EPN,” focusing on perceptions that the president, his name abbreviated here, had been played.

“Trump not only did not show repentance, he reaffirmed his agenda. EPN not only didn’t show condemnation, he reaffirmed his passivity,” tweeted José Merino, a political science professor,

“Peña votes for Trump,” wrote columnist Puig in the newspaper Milenio. “The government has decided to bet on a candidate, who has insulted the country, the Mexican people, and given him incredible photos—to someone who was going to lose.”

The decision to invite Trump invoked comparisons to past presidential errors: the managing of the peso prior to the tequila crisis of 1995, the inept response to the 1985 earthquake when foreign assistance wasn’t let into the country and victims had to fend for themselves, and the snap announcement to nationalize the banks in 1982. Inviting Trump at the last minute, however, might go down as the most notorious of all. “None was as bad as yesterday’s suicide,” said Gerardo Priego Tapía, a former congressman from Tabasco state. “It’s the biggest embarrassment (on an issue Mexicans feel strongly about) that a president has committed with the Mexican people watching in many decades.”

Others saw it as a missed opportunity and a complete misreading of the public mood, which wanted the president to rebuke to Trump—even if such rhetoric risked souring relations with Republicans should their candidate win the U.S. presidential election. Some had speculated in the lead-up to Trump’s arrival that the encounter offered Peña Nieto the chance to reverse his putrid numbers by telling off the most reviled man in Mexico. Instead, it showed ineptness, according to one analyst. “Peña’s speech should have been a scramble to save face, but the government was so woefully unprepared that what at first just seemed like a completely bad idea ended up being close to a national crisis,” said Esteban Illades, editor of the public affairs magazine Nexos. “It was proof that this government, four years in, doesn’t have a clue about its place in the world.”

How the meeting came together remains something of a mystery, though Peña Nieto has said that he invited both Trump and Hillary Clinton to visit the country. Popular wisdom suggests that Los Pinos—the president’s office and residence—never expected Trump to accept the invitation. And the meeting did carry an air of hastiness, with many in the foreign ministry apparently left out of the loop even though there had been a new ambassador to Washington appointed in April, and staff had been working on a strategy to improve perceptions of Mexico in the United States. “The whole foreign affairs apparatus was apparently bypassed in this decision,” said Arturo Franco, senior non-resident fellow at the Atlantic Council.

History, he adds, won’t be kind to Peña Nieto. “This was a mistake of multi-generational proportions.”