Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Republican presidential nominee Donald Trump will meet with Mexican President Enrique Peña Nieto ahead of a major speech on immigration on Wednesday.

The Washington Post first reported that Peña Nieto had extended invitations to both Trump and his Democratic opponent, Hillary Clinton, to travel to Mexico City for a meeting. Trump and the Mexican leader later confirmed the meeting on Twitter:

I have accepted the invitation of President Enrique Pena Nieto, of Mexico, and look very much forward to meeting him tomorrow. — Donald J. Trump (@realDonaldTrump) August 31, 2016

El Señor @realDonaldTrump ha aceptado esta invitación y se reunirá mañana en privado con el Presidente @EPN. — Presidencia México (@PresidenciaMX) August 31, 2016

Trump is scheduled to deliver what's billed as a "major speech" on immigration Wednesday in Arizona.

Trump spoke at a rally Tuesday night in Everett, Washington. He didn't mention Mexico, but he has previously signaled he'd be willing to meet with Peña Nieto, who has strongly criticized Trump's anti-immigration rhetoric and particularly his promise to make Mexico pay for a wall on the country's border with the U.S.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"Absolutely, I'd meet with him," Trump said in a Fox News interview last week.

Jennifer Palmieri, the Clinton campaign's top spokeswoman, recalled Trump's earlier characterizations of Mexicans as "rapists" and "criminals" and said, "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."

A senior campaign official told NBC News that "our campaign is in a regular dialogue with the Mexican government officials" and that Clinton is looking forward to talking with Peña Nieto again "at the appropriate time."

Clinton traveled to Mexico in March 2009 to discuss joint U.S.-Mexican anti-organized crime initiatives shortly after she became secretary of state. She later met with Peña Nieto at his presidential palace in September 2014 during a speaking trip to the country.

Wednesday's meeting could be highly charged, because neither Trump nor Peña Nieto has pulled any punches when sparring over immigration.

Trump introduced the keynote plank of his candidacy in his very first speech announcing his campaign in June 2015: "I would build a great wall, and nobody builds walls better than me, believe me, and I'll build them very inexpensively. I will build a great, great wall on our southern border, and I will have Mexico pay for that wall, mark my words."

In another widely criticized observation, Trump said last year: "When Mexico sends its people, they're not sending the best. They're sending people that have lots of problems, and they're bringing those problems.

"They're bringing drugs. They're bringing crime," he said. "They're rapists, and some, I assume, are good people, but I speak to border guards, and they're telling us what we're getting."

Peña Nieto has given back as good as he's gotten.

In March, Peña Nieto said in an interview with the Mexican newspaper Excelsior that there was "no scenario" under which Mexico would pay for Trump's wall.

And he went on from there: "There have been episodes in human history, unfortunately, where these expressions of this strident rhetoric have only led to very ominous situations in the history of humanity.

"That's how Mussolini got in. That's how Hitler got in. They took advantage of a situation, a problem, perhaps, which humanity was going through at the time, after an economic crisis.

"And I think what [they] put forward ended up at what we know today from history — in global conflagration. We don't want that happening anywhere in the world," he said.

Arizona Sen. Jeff Flake, a Republican who has been critical of Trump, said of the visit "it's a good idea" — if only to show Trump that immigration issues are more complicated than "platitudes" about building a wall.

"I hope when he sits down with the Mexican president, that the Mexican president will tell him how important NAFTA is for both of our countries, to tell him how those crossing the border aren’t Mexico’s worst. That they aren’t rapists. To tell him this is a complicated issue," Flake said.