Donald Trump discussed his plan to build a wall along the southern U.S. border in a private meeting with Mexican President Enrique Pena Nieto on Wednesday but said they left the crucial question of who would pay for the wall's construction for another day.

Speaking after an hour-long meeting at the presidential palace in Mexico City, Trump called the session "excellent" and said in prepared remarks that he and Pena Nieto discussed "the right of either country to build a physical barrier, or wall."

"We did discuss the wall. We didn't discuss payment of the wall," he said. "That will be for a later date. This was a very preliminary meeting."

Later, however, Pena Nieto said that the two had, indeed, discussed the wall -- and that he told Trump Mexico would not pay for it.

"At the beginning of the conversation with Donald Trump, I made clear that Mexico would not pay for the wall," the Mexican president Tweeted. The Trump campaign did not immediately respond.

For his part, Pena Nieto, who once compared Trump to Adolf Hitler and Benito Mussolini, subtly rebuked Trump Wednesday, promising to respect the American electoral process and vowing to work with whomever is elected in November, be it the billionaire or Democratic nominee Hillary Clinton, to whom he also extended an invitation for a discussion.

"Mexicans have felt offended by what has been said, but I am certain that [Trump's] genuine interest is in building our mutual societies' improved well-being," he said. "The intention and the will as the president of Mexico is to meet both candidates so we can build together."

The hastily assembled trip – announced late Tuesday – was a chance for Trump to appear presidential, sharing a stage with a world leader in advance of his speech in Phoenix on Wednesday night in which he is expected to clarify his stance on immigration.

The moment seemed ripe for disaster, given that Trump launched his campaign by characterizing some Mexican immigrants are "rapists" and "criminals," comments to which Pena Nieto issued a caustic response, but ultimately the joint appearance was pulled off without a hitch.

"This was an awkward political moment on steroids, indeed," Samuel Rodriguez president of the National Hispanic Christian Leadership Conference told U.S. News. But "In a de facto manner, it legitimizes the campaign."

Still, tensions were nonetheless apparent. The two men only briefly shook hands and did not appear to linger for photographs.

In the course of his remarks, the Mexican president acknowledged that Trump's comments had been harmful – just 2 percent of Mexicans said they hoped Trump would win the election in a poll taken in June. But he also said Wednesday's trip was a positive step.

"There's maybe been a misunderstanding or statements that have hurt, unfortunately, that have had an impact on Mexicans and hurt their perception of his candidacy," he said.

"Exchanges between the U.S. and Mexico contribute talent and prosperity on both sides of the border. Mexicans in the U.S. are honest people and hard-working," he said, in what seemed to be a direct response to Trump's 15-month old remarks. "They are well-intentioned people who respect the institutions of family and community life and the law. In exchange, Mexicans deserve the respect of everyone."

He said border security was the responsibility of both Mexico and the U.S. and noted that illegal immigration from Mexico, after peaking a decade ago, had slowed. And while the conversation on border security in the U.S. tends to focus on immigrants, Pena Nieto said the U.S. needed to do more to stem the southward flow of weapons and cash that benefits violent cartels.

Pena Nieto touted the benefits of the North American Free Trade Agreement, which he said had been "very good for both the United States and Mexico" and kept many manufacturing jobs in the hemisphere that might otherwise go to Asia or elsewhere.

"I do not believe that trade must be a zero-sum endeavor that when one loses, one wins," he chided. "Quite on the contrary: It should be an effort that produces value on both sides and makes our region, North America, the most competitive and productive in the whole world."

To the extent that Trump has driving principles in his campaign, besides immigration, his opposition to free trade agreements like NAFTA and the proposed Trans-Pacific Partnership has been central to his candidacy.

On Wednesday, Trump demanded changes to the two-decade-old agreement.

"I shared my strong view that NAFTA has been a far greater benefit to Mexico than it has been to the U.S. and that it must be improved upon that workers in both countries benefit from fair and reciprocal trade," he said. "We must take action to stem the tremendous outflow of jobs from our country."

But he otherwise struck a diplomatic tone, referring to the Mexican president as his "friend" and repeatedly expressing that he was honored to have received the invitation to meet.

"Both of our countries will work together for mutual good, and most importantly for the mutual good of our people," he said. "We want what's good for the U.S. and [Pena Nieto] wants what's good for Mexico, and sitting down, we've realized it's good for both of us, better for both of us."

National Hispanic Christian Leadership Conference

Join the network identified as "America's largest Hispanic Evangelical organization." We exist to unify, serve and represent the Hispanic Evangelical Community with the divine (vertical) and human (horizontal) elements of the Christian message all while advancing the Lamb’s agenda.