“It wasn’t just about the encounter of two cultures,” Mr. López Obrador said. “It was an invasion. Thousands of people were murdered during that period. One culture, one civilization, was imposed upon another to the point that the temples — the Catholic churches were built on top of the ancient pre-Hispanic temples.”

But what caught the attention of his many critics in Mexico was his call for an apology.

“The Spaniards who stayed in Spain bear no responsibility for what happened here 500 years ago,” wrote one columnist, Sergio Sarmiento.

Some noted that Cortés conquered the Aztecs in alliance with other indigenous communities, raising a question about whether Spain was the only one at fault.

“Do we properly know who is ‘us’ and who is ‘them’?” wrote Jorge G. Castañeda, a former foreign minister. “Is this a Pandora’s box we want to open? Or is it pure demagogy?”

Mr. López Obrador was accused of trying to create a distraction to divert attention from Mexico’s problems, including brutal gang violence and a slowing economy.

One reporter asked the president why he was not demanding that France and the United States, which also invaded Mexico, apologize as well. And if Spain should apologize, critics said, should Mexico not apologize as well for its treatment of indigenous groups since independence?

Mr. López Obrador said he planned to do that.

In Spain, Mr. Borrell made a similar argument.

Could Spain ask France to apologize for crimes committed during the Napoleonic wars, he asked, when the French invaded the Iberian Peninsula? Could France itself ask for an apology from Italy for the way the Romans conquered the Gauls under Julius Caesar?