Contradicting Trump's assertion that the pair did not discuss who would pay for his proposed wall, Pena Nieto said after the departure of the Republican presidential candidate that he told him during their private meeting in Mexico City that his government would not pick up the bill.
"At the beginning of the conversation with Donald Trump I made it clear that Mexico will not pay for the wall," Pena Nieto said in a tweet after not mentioning the issue during their joint news conference.
Al inicio de la conversación con Donald Trump dejé claro que México no pagará por el muro.— Enrique Peña Nieto (@EPN) August 31, 2016
Trump gave a different account of the conversation, which was aimed at repairing relations damaged by the real estate mogul's attacks on Mexico and migrant workers on the campaign trail.
"We did discuss the wall, we didn’t discuss payment of the wall, that will be at a later date, this was a very preliminary meeting. It was an excellent meeting," Trump said.
His campaign waved off Pena Nieto's statement, calling the meeting a first attempt at building a relationship.
"It was not a negotiation, and that would have been inappropriate. It is unsurprising that they hold two different views on this issue, and we look forward to continuing the conversation," Trump spokesman Jason Miller said.
Many Mexicans were furious about Trump's visit, deeply offended by how Trump has labeled Mexicans as rapists and drug traffickers, and wanted an apology. That did not come.
Even in private, Trump did not apologize to Pena Nieto, presidential spokesman Eduardo Sanchez told Reuters.
Former President Vicente Fox, who is railing against my visit to Mexico today, also invited me when he apologized for using the "f bomb."— Donald J. Trump (@realDonaldTrump) August 31, 2016
Trump is trailing Democratic rival Hillary Clinton in opinion polls for the Nov. 8 election. The New York businessman's aides hoped the trip would make him look presidential and show he is willing to deal head on with a thorny issue like relations with Mexico.
The scenes of a measured Trump meeting with a foreign leader were aimed at convincing moderate American voters to see him in a more positive light as he tries to broaden his appeal.
Trump's call for Mexico to fund the wall is often the central moment of his campaign rallies. He asks the crowd who will pay for the wall, and supporters shout back, "Mexico!"
DEMONSTRATORS: "TRUMP AND PENA OUT"
Mexican opposition politicians attacked Pena Nieto for hosting Trump.
The Republican candidate first made his accusations that Mexico is sending criminals and rapists across the border and pledged to build a wall that Mexico would pay for when he launched his presidential bid in June last year. He has also accused Mexico of cheating the United States on trade.
The Mexican president said the many millions of Mexicans in the United States deserve respect, but offered only a mild rebuke of Trump for his rhetoric.
"The Mexican people has felt aggrieved by comments that have been made, but I was sure his interest in building a relationship is genuine," Pena Nieto said at their joint news conference after the talks.
A few dozen demonstrators gathered beneath a monument to Mexican independence in the center of the capital to protest the visit, some holding placards emblazoned with captions such as "You are not Wall-come" and "Trump and Pena out."
Pena Nieto has been enmeshed in his own controversies, including over whether he plagiarized some of his 1991 undergraduate law thesis.
Trump's visit to Mexico City took place hours before he was due to deliver a highly anticipated speech in the U.S. border state of Arizona on how he will tackle illegal immigration if he wins the election.
Trump has been pilloried in Mexico since he launched his White House campaign last year.
He has pledged to renegotiate or scrap the 1994 North American Free Trade Agreement trade deal between the United States, Mexico and Canada.
Clinton, a former secretary of state, said on Wednesday that Trump could not paper over his previous harsh language against Mexico, which helped him defeat 16 rivals for the Republican presidential nomination.
"It certainly takes more than trying to make up for more than a year of insults and insinuations by dropping in on our neighbors for a few hours and then flying home again," she told a convention of the American Legion military veterans' group in Cincinnati.