Donald Trump's visit to Mexico on Wednesday (31 August) to meet with Mexican President Enrique Peña Nieto proved that a lot can change in a year of campaigning. Despite kicking off his bid for the White House by calling Mexican immigrants to the US "rapists" and drug dealers, Trump offered warm praise for Mexican-Americans.

In a subdued joint appearance in Mexico City, Trump called Peña Nieto a friend and vowed to work with Mexico if he is elected president in November. The GOP nominee, who has made immigration a key issue in his campaign, said Mexican-Americans were "beyond reproach" and "spectacular, hard-working people," the New York Times reported.

Despite the emollient comments, Trump said he told the Mexican president that he believed Mexico had benefited disproportionately from trade agreements with the US. According to the Times, Peña Nieto pushed back against Trump's comments on The North American Free Trade Association (Nafta) and cited statistics by the US Chamber of Commerce that argued free trade between the neighbouring countries had been beneficial for both.

Trump also told the press that the two men had discussed building a wall on the border but did not discuss the issue of forcing Mexico to pay for it which Trump has repeatedly stated he would do if elected.

While Peña Nieto did not contradict the border idea during the news conference, he later took to Twitter to clarify he had told Trump that Mexico would not pay for the wall.

Peña Nieto also called out Trump for making hurtful comments regarding Mexicans in the US. "Mexican nationals in the United States are honest people, working people," he said, according to the Times. "Mexicans deserve everybody's respect." The Mexican president did not attack the presidential nominee but instead expressed his hope that the two would work together if Trump is elected.

Donald Trump in Mexico
US presidential candidate Donald Trump (R) delivers a joint press conference with Mexican President Enrique Pena Nieto in Mexico City on August 31, 2016. YURI CORTEZ/AFP/Getty Images

The meeting between Trump and Peña Nieto was heavily criticised by Mexicans, according to The Associated Press. Mexico security analyst Alejandro Hope told the AP the meeting was "a disaster" and that Peña Nieto basically gave Trump a free pass.

Columnist Jorge Zepeda added Trump "came for a photo op and Enrique Peña Nieto allowed himself to be used to benefit his (Trump's) campaign".

The AP and New York Times both reported that despite discontent over the visit, there were only a few small protests prior to the meeting. "This is an insult and a betrayal," artist Arturo Meade, who attended a protest with his young son, told the AP. "What can this meeting bring us, except surrealism in all its splendour?"

Following the last-minute visit, Trump made his way back to the US, where he is set to give a major speech on immigration in Arizona.