US Republican candidate Donald Trump will travel to Mexico City later on Wednesday to meet Mexican President Enrique Peña Nieto, after more than a year of making derogatory remarks about the country during his presidential campaign.

Mr Peña Nieto invited Mr Trump and his Democratic opponent Hillary Clinton last Friday and both Mr Trump and Mr Peña Nieto tweeted last night that they would meet each other privately in Mexico today.

“I have accepted the invitation of President Enrique Peña Nieto, of Mexico, and look very much forward to meeting him tomorrow,” Mr Trump wrote last night.

The Mexican president’s office wrote that “El Señor” Donald Trump had accepted the invitation and would meet him today.

The two men are expected to meet privately. The location has not been disclosed. It will be Mr Trump’s first official meeting with a head of state as the Republican presidential nominee.

“I believe in dialogue to protect Mexican interests in the world and, principally, to protect Mexicans wherever they are,” said Mr Peña Nieto.

The visit will come hours before the Republican nominee delivers a closely watched speech in Arizona to explain his views on immigration policy that has wavered at times over the past fortnight from his hardline positions in an attempt to appeal more to minority voters.

Falling poll numbers

In the face of falling poll numbers against Mrs Clinton, particularly in battleground states where she has strong support among Hispanic and other minority voters, Mr Trump has appeared willing to soften his immigration policies in an effort to make up lost ground.

Mr Trump’s anti-immigration stance has been the signature policy and his anti-foreigner rhetoric, the hallmark of his bombastic campaign. He has promised to deport an estimated 11 million immigrants living illegally in the US, including millions of Mexican-born migrants.

In some of the most incendiary remarks of his campaign, the New Yorker has denigrated Mexican immigrants as criminals, drug dealers and “rapists,” promised to build a wall along the US border with Mexico and to make the Mexican government pay for it, and threatened to unwind the North America Free Trade Agreement, triggering alarm within Mexico.

The property mogul has threatened to block cash being sent home by Mexicans living in the US until the country agrees to pay for the wall, estimated to cost tens of billions of dollars.

Mr Peña Nieto has dismissed Mr Trump’s plan to make Mexico pay for the wall and likened the Republican candidate to Adolf Hitler and Benito Mussolini.

Mr Trump has attacked America’s southern neighbour for “ripping off the US more than almost any other nation” as US firms have taken advantage of lower-cost Mexican labour.

The businessman has condemned Mexicans from the outset of his 14-month campaign.

“When Mexico sends its people, they’re not sending their best,” Mr Trump said at the launch of his presidential bid in Trump Tower in June 2015.

“They’re bringing drugs, they’re bringing crime. They’re rapists and some, I assume, are good people.”

The Clinton campaign released a statement in response to the news of Mr Trump’s meeting with the Mexican president, referring to his past remarks about Mexicans.

“What ultimately matters is what Donald Trump says to voters in Arizona, not Mexico, and whether he remains committed to the splitting up of families and deportation of millions,” said Mrs Clinton’s communications director Jennifer Palmieri.