The meeting with President Enrique Pena Nieto, who earlier this year compared the billionaire candidate to Hitler, comes hours before Trump is set to deliver a highly-anticipated immigration speech. It's a defining issue for Trump, but one on which he has appeared to waiver.
After saying during his primary campaign he would expel all of the estimated 11 million people living in the country illegally with a "deportation force," Trump has suggested recently he might be open to "softening" his stance as he tries to win over more moderate general election voters.
In meetings recently with Hispanic supporters, Trump had suggested he could be open to allowing some people living in the country illegally to stay. After one such roundtable this month, his new campaign manager, Kellyanne Conway, said Trump's stance on using a deportation force to expel people was "to be determined."
In the days since, Trump and his staff have broadcast varied and conflicting messages — though on Wednesday Conway appeared to make clear that Trump had decided against allowing immigrants in the U.S. illegally to stay.
"(T)he point that Mr. Trump has made again and again is that you don't get amnesty and you don't get legalization since you broke the law to be here in the first place. But then he also respects it's a complex issue," Conway said in an interview with MSNBC. She added that Trump's plan would be "the toughest on illegal immigration than anyone's ever been and he means it, he's meant it from day one."
But on the eve of the speech, Trump's campaign added a new wrinkle with news that he would be paying a surprise visit to Mexico City in the hours before the speech.
Trump took to Twitter on Tuesday night to say he looks "very much forward" to meeting with Pena Nieto. The Mexican leader's office confirmed the meeting with its own tweet, saying the two men would meet privately.
Pena Nieto has been sharply critical of Trump's original immigration policy, particularly the Republican's plan to build a wall along the length of the southern border and his insistence that Mexico would pay for it. In a March interview, Pena Nieto said that "there is no scenario" under which Mexico would do so and compared Trump's language to that of dictators Adolf Hitler and Benito Mussolini.
Former Mexican Presidents Vicente Fox and Felipe Calderon have also alluded to Hitler in describing the GOP nominee.
Pena Nieto cast a different tone late Tuesday, writing on Twitter of the visit, "I believe in dialogue to promote Mexico's interests in the world and, principally, to protect Mexicans wherever they are."
While Trump's visit came as a surprise, New Jersey Gov. Chris Christie, a close Trump adviser, has been among those pushing Trump to make the trip, according to a person familiar with their conversations who spoke on the condition of anonymity in order to discuss them publicly. Christie made his own successful trip to Mexico City in September 2014 and has a warm relationship with the Mexican president.
Last week, Pena Nieto extended invitations to visit Mexico to both Trump and Democrat Hillary Clinton, who met with him in Mexico in 2014. The Washington Post first reported Tuesday that Trump was considering making the trip to Mexico.
Trump has spent much of his campaign railing against the U.S.'s trade imbalance with Mexico and other countries and promising that, if he's elected president, he will punish companies that try to move jobs overseas. During his announcement speech, Trump accused Mexico of sending its rapists and criminals across the border, and vowed to build a giant wall to stop them, along with the flow of illegal drugs.
Trump's short stop in Mexico would mark his second visit to a foreign country during his campaign. Earlier this summer, Trump traveled to Scotland to attend the re-opening of one of his golf resorts, but notably didn't meet with any U.K. political leaders while there.
The Republican has faced a torrent of criticism from Clinton, a former secretary of state, about his preparedness to lead on the world stage. Several Republican foreign policy experts have also warned that Trump is unprepared for the numerous international issues that land on a president's desk.
Clinton's campaign has urged voters to not "be fooled" by what it calls Trump's attempts to disguise his immigration policies.
"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 Clinton campaign communications director Jennifer Palmieri.