Donald Trump announced Tuesday night that he will meet Wednesday with the President of Mexico just hours before he is set to deliver a speech focused on immigration policy.
"I have accepted the invitation of President Enrique Peña Nieto, of Mexico, and look very much forward to meeting him tomorrow," Trump tweeted as reports swirled that Trump was mulling a last-minute trip to Mexico.
The office of the Mexican President confirmed in a tweet late Tuesday night that Trump had accepted Peña Nieto's invitation and that the two will meet privately on Wednesday.
"In the past days, the President @EPN invited both U.S. presidential candidates to a dialogue on the bilateral relations between Mexico and the United States. Mr. @realDonaldTrump has accepted the invitation and will meet tomorrow in private with the President @EPN."
A meeting between Trump and Peña Nieto would be extraordinary, given Trump's continued pledges to build a wall on the border with Mexico and make Mexico pay for it. Trump has also stoked fierce criticism in Mexico and in the Hispanic community at large for his at-times inflammatory rhetoric in discussing illegal immigration.
The Washington Post first reported Trump was mulling a meeting with Peña Nieto before Trump confirmed it.
At a Tuesday night rally, Trump stuck to his tough-talking rhetoric.
"We are also going to secure our border and stop the drugs from pouring in and destroying our country. And I'll be talking about that tomorrow night in Arizona, big speech on immigration," he said in Everett, Washington.
The visit follows months of warring words between Trump and Mexico's leaders, including when Peña Nieto compared Trump to brutal dictators Adolf Hitler and Benito Mussolini.
Trump in the early months of his campaign also leveled unfounded accusations that the Mexican government was intentionally sending its unwanted citizens across the border and into the United States
But both Trump and Peña Nieto have publicly expressed a willingness in recent weeks to meet with one another.
"Mrs. Hillary Clinton and Mr. Donald Trump, I would like to express to both of them my greatest respect, my deepest respect. And from right now, I propose going into a frank, open dialogue with whomever is elected," Nieto said in July during a joint news conference with President Barack Obama at the White House.
Criminals and 'rapists'
But if Trump and Peña Nieto were to meet, they would have their differences to discuss.
Trump launched his presidential campaign last summer in controversy by characterizing undocumented Mexican immigrants as criminals and "rapists" and accused the Mexican government of "sending people that have lots of problems" into the US.
"When Mexico sends its people, they're not sending their best. They're not sending you. They're not sending you. They're sending people that have lots of problems, and they're bringing those problems with us. They're bringing drugs. They're bringing crime. They're rapists. And some, I assume, are good people," he said.
And Peña Nieto has repeatedly asserted that his country will not pay for the border wall Trump plans to build on the border between their two countries.
In a wide-ranging July interview with CNN's Fareed Zakaria, Peña Nieto shot down Donald Trump's campaign promise that he's going to build a wall and Mexico will foot the bill.
"We also have to bear in mind that the security of the United States is linked with the security of its neighboring countries," he said. "And this is what we have built. And I'll say it again, this is what we have been doing with the US government. We have a relationship of coordination, of collaboration and of cooperation in the area of security, precisely in order to have security in Mexico, to have security in the US and ... we are journey companions. We are strategic partners working for security in North America."
"There is no way that Mexico can pay [for] a wall like that," he said.
In a March interview with a Mexican newspaper, Peña Nieto compared Trump's "strident rhetoric" to Hitler and Mussolini's.
"That's how Mussolini got in, that's how Hitler got in. They took advantage of a situation, a problem perhaps," the Mexican president said, according to an English translation by Reuters.
Peña Nieto explained those comments during a news conference in June.
"Hitler, Mussolini, we all know the result," he said, according to Reuters. "It was only a call for reflection and for recognition, so that we bear in mind what we have achieved and the great deal still to achieve."
Peña Nieto added that the world is at times "presented with political actors and political leaders who assume populist and demagogic positions."
While Trump has wavered in the last week on whether he will seek to deport all the undocumented immigrants living in the US back to their countries, he has stuck by his pledge to build a wall on the border with Mexico and make the country pay for it.
Trump has previously said he would pay for the wall by leveraging Mexico's economic gains through its trade with the US. He has also threatened to withhold remittance payments immigrants in the US send to relatives in Mexico and increasing fees for Mexican visa applicants.
Jennifer Palmieri, Clinton's campaign communications director, issued a statement following the announcement outlining Trump's previous negative comments about Mexico.
"From the first days of his campaign, Donald Trump has painted Mexicans as 'rapists' and criminals and has promised to deport 16 million people, including children and US citizens," she said. "He has said we should force Mexico to pay for his giant border wall. He has said we should ban remittances to families in Mexico if Mexico doesn't pay up."
She added: "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."
CNN's Kevin Liptak, Ashley Fantz and Dan Merica contributed to this report.