(CNN) Donald Trump flew into a nation he has constantly berated during his campaign to meet President Enrique Peña Nieto and said they discussed a wall Trump has vowed to build on the US southern border, but not his demand that Mexico pay for it -- an assertion the Mexican president later disputed.
"Who pays for the wall? We didn't discuss," Trump had said when asked by a reporter during a news conference following their meeting in Mexico City. "We did discuss the wall. We didn't discuss payment of the wall. That'll be for a later date."
But Peña Nieto later claimed the two had discussed the wall and who would pay for it -- and he had "made it clear" to Trump it wouldn't be Mexico.
"At the start of the conversation with Donald Trump, I made it clear that Mexico will not pay for the wall," Peña Nieto tweeted, after their meeting Wednesday.
He added that his conversation with the Republican nominee then moved on to other topics in a respectful fashion.
Jason Miller, Trump's senior communications adviser, called the meeting "the first part of the discussion and a relationship builder" between the two men, after Peña Nieto tweeted.
"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," he said in a statement.
In subsequent interviews in Mexico, Peña Nieto reiterated his version of events. He told CNN affiliate Televisa in an interview late Wednesday some of the positions Trump has taken "are a threat to Mexico."
He also told the outlet he was very clear with Trump about the subject of a wall at the border and insisted Mexico would not pay for it and he made Trump aware that the people of Mexico had been "very insulted."
Peña Nieto, speaking alongside Trump during their joint appearance, twice stressed the "responsibility" he has to defend Mexican people around the world and said Trump has made "assertions that regrettably had hurt and have affected Mexicans."
"The Mexican people have felt hurt by the comments that have been made. But I am sure that his genuine interest is to build a relationship that will give both of our society's better welfare," Peña Nieto said.
Trump apparently left his tough deal-making persona at home as he received a presidential-style news conference on foreign soil while on a high-risk trip to Mexico on Wednesday.
The visit appeared to be an attempt to bolster Trump's credentials as a potential world leader, following searing attacks on his temperament by his Democratic rival Hillary Clinton. The spur-of-the-moment trip also came hours before Trump was due to deliver a speech in Arizona meant to clarify his murky immigration policy amid signs he is softening his prior promise to deport 11 million undocumented migrants.
Trump's claim that they didn't discuss who would pay for the wall -- despite his call for Mexico to finance it being a central theme of his campaign and one he frequently uses to fire up his supporters -- appeared to be a noteworthy omission from Wednesday's conversation when he mentioned it at their joint appearance.
The cost is one that Peña Nieto has previously refused to shoulder, just one of many issues where the two men have clashed. Peña Nieto, who has previously compared Trump to Adolf Hitler, greeted him courteously and said he was committed to working with whomever Americans elect as their next president in November.
But turning the tables on Trump, he gave the billionaire an earful on trade, said illegal immigration from Mexico to the US peaked years ago and complained of the torrent of guns that he said crossed the border and worsened Mexico's drug wars.
Nieto said in an interview late Wednesday that some of the positions Donald Trump has taken "are a threat to Mexico." He told CNN affiliate Televisa that he made Trump aware that the people of Mexico had been "very insulted" by his comments.
Trump's backers were left to defend his decision not to mention his demand that Mexico pay for the border wall after the visit. Maricopa County, Arizona, Sheriff Joe Arpaio told CNN's Jake Tapper: "What difference does it make? The wall's important no matter who pays."
While Trump's decision not to raise who would pay for the wall appeared to undercut his deal-making swagger, it could also reassure some wavering Republican voters who dislike Clinton but are not yet convinced Trump possesses the restraint and sobriety required of a US president.
The sight of Trump alongside the Mexican president provided the photo-op that the campaign appears to have banked on despite not knowing how the candidate would be received.
Still, the Clinton campaign came out swinging, accusing Trump of failing to make good on his pledge to make Mexico pay for the wall by not raising the issue.
"Donald Trump has made his outlandish policy of forcing Mexico to pay for his giant wall the centerpiece of his campaign. But at the first opportunity to make good on his offensive campaign promises, Trump choked," Clinton campaign chairman John Podesta said in a statement.
"What we saw today from a man who claims to be the ultimate 'deal maker' is that he doesn't have the courage to advocate for his campaign promises when he's not in front of a friendly crowd," Podesta said, before accusing Trump of wanting to build a costly wall at American taxpayers' expense.
Podesta later added: "It turns out Trump didn't just choke, he got beat in the room and lied about it."
Peña Nieto began his remarks alongside Trump by saying the two held a constructive exchange of views even though "we might not agree on everything."
He then launched into a detailed defense of US-Mexican trade and its benefit to both countries delivered by the North American Free Trade Agreement -- a common punching bag for Trump on the campaign trail.
The Mexican leader told Trump that both the US and Mexico had benefited from NAFTA, saying more than six million US jobs rely on exports to Mexico.
"I don't think that commerce must be considered a zero sum game, so that only one wins and the other one loses," he said, though added he was prepared to make the two-decades-old deal, which also includes Canada, better for both nations.
Trump was also told by his host that Mexicans deserve everybody's respect wherever they are, in an apparent reference to the GOP nominee's harsh rhetoric towards undocumented migrants.
Trump, who listened to his host's long remarks with a somber look on his face while a woman stood beside him at the podium translating for him, said that Mexicans were "spectacular" people when it was his turn to talk.
But he laid bare disagreements between the two men when he said it was imperative to stop the "tremendous outflow" of jobs from the United States over the southern border, and that NAFTA had benefited Mexico more than the US. And he stood up for America's right to build a "physical barrier or wall" on its territory to stop illegal immigration and drug traffickers. Trump warned that NAFTA would have to be renegotiated.
Trump's calls for deporting all undocumented workers, labeling many Mexican immigrants "rapists" and "criminals," and plan to build a wall along the border -- that Mexico would pay for -- have earned him withering criticism from Peña Nieto, as well as many independents and moderate Republicans.
But they are central pillars of his campaign, which has galvanized his white working class base behind his White House bid. Those most fervently opposed to immigration have pushed back against the rumored "softening" in his stance that he could articulate on Wednesday night.
Trump, speaking from prepared remarks, was far more metasured than in his campaign trail appearances. Though he mostly stuck his positions on renegotiating NAFTA and halting illegal immigration, he was also conciliatory. He referred to illegal immigration from Central America rather than just from Mexico. He said a secure border barrier would benefit both nations. And he spoke of the flight of jobs not from the United States but from also from Mexico and Central America to overseas economies.
It is not unusual for presidential candidates to venture abroad during a campaign. Both Barack Obama and Mitt Romney made trips to bolster their foreign policy credentials in 2008 and 2012.
But Trump's approach -- like the rest of his campaign -- is highly unorthodox. Presidential candidates do not typically show up in foreign capitals for talks with leaders without intense preparation and highly choreographed game plans. Often, the parameters of a meeting are settled in advance. This trip was announced Tuesday night.
In addition, they usually visit strong allies where they are assured of a warm reception that will make for positive media coverage rather than sitting down with a leader who has compared them to Hitler and has disparaged their policy proposals.
Trump's style, however, is more impulsive and unpredictable. He had never before met a foreign leader in an official capacity. So his trip represented something of a risk. Even though the meeting with Peña Nieto was private, he has no control over how the Mexican leader will address the public and how his officials will brief journalists about it afterward.
RELATED: What is Donald Trump's immigration plan -- and when will we see it?
The trip was also unusual for not including his traveling press corps and coming against the advice of US diplomats.
The campaign's decision to travel to a foreign country -- one rife with security risks for a candidate who has stoked tensions with his rhetoric on Mexican immigrants -- without reporters following close behind marks an unprecedented moment in the coverage of major party presidential nominees.
In addition, staff at the US Embassy in Mexico advised the Trump campaign against making such a hastily arranged trip, suggesting it would be logistically difficult to organize on such short notice, according to a source familiar with the discussions.