Donald Trump met with Mexican President Enrique Peña Nieto during a hastily planned trip to Mexico City on Wednesday, in which both men said they discussed the need for a good relationship between the United States and Mexico.

However, during the hour-long meeting between Trump and Peña Nieto, Trump said he did not bring up who would pay for the border wall that he's made a cornerstone of his presidential campaign.

"We did discuss the wall, we didn't discuss payment of the wall," Trump said during a news conference after the meeting.

Peña Nieto later contradicted Trump. Shortly after a spokesman for the Mexican president said that the two had indeed discussed paying for the wall, Peña Nieto tweeted that he'd told Trump at the outset of their meeting that Mexico wouldn't pony up.

Speaking first at the news conference after the two men met, Peña Nieto said he expressed to Trump the need for mutual respect between the United States and Mexico, alluding to the previous incendiary comments Trump has made about Mexicans, including calling them "rapists" and "criminals."

"Mexicans have been offended by what has been said," Peña Nieto said.

Trump's meeting with Peña Nieto came just hours before he is set to give a speech in Arizona aimed at giving clarity to his now muddled immigration stance.

His campaign hoped the meeting would make Trump look presidential, as well as highlight the negotiating skills he's touted on the campaign trail for more than a year.

Trump said he expressed to Peña Nieto the need to stop the flow of undocumented immigrants, as well as renegotiate trade agreements he said benefit Mexico more than the United States.

However, Trump said he did not ask Peña Nieto to pay for the border wall, which has been a pillar of his campaign. Getting crowds to chant that Mexico will pay for Trump's proposed border wall has become a mainstay of the candidate's rallies.

Prior to the meeting, Peña Nieto took heat from Mexicans, many of who said Peña Nieto never should have invited nor met with Trump in the first place, the New York Timesreported.

But following the meeting, Peña Nieto seemed to defend his decision to speak with Trump, saying he defended the Mexican people and told Trump they were worthy of respect.

"Mexicans in the United States are people who are honest and hardworking. They are people of good nature who respect their families, who respect their communities and the law, and as such, Mexicans deserve the respect of everyone," Peña Nieto said.