Republican presidential candidate Donald Trump met with President Enrique Peña Nieto at the president's official resident in Mexico City.

It was a hastily arranged visit by a presidential candidate who has spent much of his campaign insulting Mexico and its people.

"I love the Mexican people, but Mexico is not our friend," Trump tweeted last year. "They're killing us at the border and they're killing us on jobs and trade." Earlier this summer, Trump joked about a Mexican attack on U.S. soil.

So, how's his visit going over down there? Here are some reactions:

-- Raúl Benitez Manaut, a professor at the Universidad Nacional Autónoma de México, told the website Animal Politico that the author Franz Kafka must be playing some role in the U.S. presidential election.

"I'm not even going to think about wasting neurons to rationalize Trump's visit," he said. "The only thing we need is that they announce that gas prices will go up because the wall is going to cost too much and we all have to pitch in."

-- Vicente Fox, the former president of Mexico, was more direct. He told Lopez Doriga Digital: "Trump has nothing to do; these are desperate moves. What I don't understand is why we fell for this trap, why we let him fool us."

On Twitter, Fox said that Mexico did not want Trump and would never trust him.

"I told you, Trump," he tweeted, "that 'a fish dies by his own mouth.' Now you should quit out of dignity for yourself, get back to your 'business.' "

-- Margarita Zavala, a potential presidential candidate in Mexico, tweeted: "Mr. Donald Trump, even though you have been invited, know that you are not welcome. Mexicans have dignity and we repudiate your hateful discourse."

-- Roberto Gil Zuarth, the president of the Mexican Senate, tweeted: "Inviting Donald Trump legitimizes his demagogy and hate. He threatens us with war and walls, but we open up the National Palace."

-- Enrique Ortiz Garcia, a historian, dug into colonial history to explain Trump's visit:

The caption reads, "And then the foreigner arrived who at first we thought was Quetzalcóatl."

It's in reference to Hernando Cortés' arrival in Tenochtitlán. According to some Spanish texts, the Aztecs at first confused Cortés with an important deity.

Montezuma, the Aztec emperor, welcomed the Spanish conquistador and tried to buy him off. But that backfired; Montezuma lost his empire and the Spanish began their colonial rule.

-- At Mexico City's Angel of the Independence, protesters gathered. One of them called on his president to cancel his invitation. Trump, he said, is an affront to all Mexicans.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.