SANTIAGOFinally. The Mexican President Enrique Peña Nieto reacted correctly to the new U.S. President Donald J. Trump, canceling the meeting they were scheduled to have last week. Mr. Peña Nieto seems to have come into his own!

Trump had asked for the meeting, to discuss trade, immigration and above all, frontier security. That frontier that the new American president seems to believe must become an unbreakable barrier to stop the entry of a bunch of rapists and criminals from Mexico.

Peña Nieto's reaction was hardly gratuitous. It follows a terrible piece of discourtesy Made in Trumplandia: a high-level delegation led by Foreign Minister Luis Videgaray, the former finance minister removed from his post for engineering the fiasco of Trump's visit to Mexico during the U.S. presidential campaign, had flown north for a visit to fine-tune the details of another meeting between Trump and Peña Nieto. That is when, in the latest move of his neverending political poker game, Trump decided was the perfect moment to sign his executive order to formally build the despicable wall he has been promising, and loudly repeat what he kept saying in his campaign: That Mexico would pay for it.

From that moment, the pressure on Peña Nieto peaked, and this time heard the people's outraged clamor demanding an end to the repeated slaps of denigration being thrown at Mexican dignity. It all seemed like a resuscitation of the United States' past humiliations of Mexico, even the original usurpation of vast tracts of its territory in the mid-19th century.

From Left of the Mexican political spectrum, Andrés Manuel López Obrador, the demagogue who almost won the 2006 presidential elections and will very likely run in 2018, proposed that Mexico denounce the U.S. moves at the United Nations. On the Right, where one of the fiercest critics has been the former president Vicente Fox and his one-time foreign minister Jorge Castañeda, the president was being urged to take a tough line with Trump.

Trump and Nieto in Mexico City on Aug. 31 — Photo: Ariel Ojeda/ZUMA

Peña Nieto's reaction surprised Trump and his government, leading him to distort the facts, not for the first time, and claiming that both presidents had decided to cancel the meeting, when in fact it was Peña's decision. Trump also said he would be forced to seek out other formulae to allow Mexico to finance his wall.

Before and after

It is notable that Trump should not have seen the radical changes the NAFTA free-trade treaty has brought to Mexico. Before NAFTA, Mexico was a land of profoundly anti-American sentiments, a feeling fanned by its governments both in their bilateral policy and in various international settings.

With the treaty, Mexico began a new phase of important structural reforms. It paved the way for a modern, multiparty democracy (instead of one, ruling party, the PRI, which held all the power until 2000), with freedom of expression and reporting (when PRI governments previously controlled the press by controlling paper importation). The markets began to open and allow more competition and the economy stabilized, in spite of imperfections, moving away from the big financial shocks of the past. This meant a reduction of migrant flows toward the United States, to the point where they are significantly less now than they were 20 or even 10 years ago.

In addition Mexico has become the second largest recipient of U.S. exports, a great friend and strategic ally, so necessary at the present historical juncture when fighting terrorism, drug trafficking and corruption are priorities.

Certainly, we cannot attribute all these improvements in Mexico to the United States. Obviously most of the credit goes to Mexico and its political will to make changes, but nor can one ignore how far NAFTA helped forge these changes.

These are precisely Mexico's great assets against Trump. And, yes, the fight is against Trump, not the United States. We all know there is an ample majority of Americans that understands Mexico's importance to their country, and appreciates with embarrassment that this little war against Mexico is the fruit of ignorance, inexperience and the type of populist leadership that feeds on "enemies" to keep its supporters fired up and lively.

So stand firm Peña Nieto! Time is on your side. Trump is opening so many fronts simultaneously that he will not be able to fight all his battles. Nor would one be surprised to his support base starting to melt away soon.

As for Mexicans, as former President Fox said, they are small but "feisty," and the Trump humiliations has done nothing but stir patriotic sentiments. Trump will start to feel that across the border, wall or no wall.

See more from Opinion / Analysis here