MEXICO CITY — If President Enrique Peña Nieto invited Donald J. Trump to visit Mexico for a dialogue in the interest of democracy, the message has fallen on deaf ears.

Instead, the predominant feeling here in the Mexican capital is one of betrayal.

“It’s a historic error,” said Enrique Krauze, a well-known historian. “You confront tyrants. You don’t appease them.”

On Mexico’s most popular morning television show on Wednesday, a livid Mr. Krauze likened the president’s meeting with Mr. Trump to the decision by Neville Chamberlain, then the British prime minister, to sit down with Hitler in Munich in 1938.

“It isn’t brave to meet in private with somebody who has insulted and denigrated” Mexicans, Mr. Krauze said. “It isn’t dignified to simply have a dialogue.”