Donald Trump has made a habit of insulting Mexicans and Mexican immigrants during his presidential bid. On Wednesday, the GOP presidential nominee will try to smooth things over. 

Trump announced that before a major immigration speech in Phoenix, Arizona Wednesday, he would pay a visit to Mexico to meet with Mexican President Enrique Peña Nieto. The trip comes after an invite from  Peña Nieto to both major party presidential candidates, according to the Wall Street Journal

Peña Nieto, 50, took office in 2012 and is in the middle of his fourth year of a six-year presidential term. He is a member of the Institutional Revolutionary Party (PRI) and previously served as governor of the State of Mexico from 2005 to 2011. Peña Nieto took office amid allegations of election fraud and promised to bring more transparency to Mexico's government. However, despite presiding over some economic improvement in Mexico, especially in the auto industry, Peña Nieto's administration has been plagued with scandals and allegations of corruption.

Enrique Pena Nieto Mexico's President Enrique Pena Nieto gives a speech next to Paraguay's President Horacio Manuel Cartes Jara (not pictured) during an official welcoming ceremony, at the National Palace in Mexico City, Mexico on Aug. 26, 2016. Photo: Reuters

Peña Nieto has reportedly wrestled with how to handle the polarizing Trump. After considering a more aggressive stance, the Mexican president has ultimately decided to stay above the fray and not weigh in on the U.S. election. His invitation is meant to kick off potential relations with the presidential hopeful. The meeting will take place in Peña Nieto’s official residence, Los Pinos, in the early afternoon and the pair will issue a statement immediately after. Neither Trump nor Nieto will take any questions from the press. 

However, critics question the motivation behind the move. Univision journalist Jorge Ramos, who has been a fierce critic of Trump, has said that Peña Nieto's invitation to Trump was meant as a distraction from the Mexican president's own problems with the media.

Trump's visit with  Peña Nieto will be highly scrutinized considering Trump's multiple controversial policy proposals affecting Mexico. Trump has promised to build a wall on the U.S.-Mexico border and deport as many as 11 million illegal Mexican immigrants in the United States back to Mexico. He has even suggested he would convince Mexico to pay for it. 

In an interview shortly after Trump initially floated that idea last year, Peña Nieto said there was "no way" it would happen. 

Trump has also criticized the North American Free Trade Agreement as part of his broader criticism of the United States' trade deals and their effects on the working class. In response to America's trade deficit with Mexico, Trump said he would consider backing out of NAFTA, a pact that Mexicans still widely support.

Hours after the Mexico visit, Trump will head to Pheonix to give a much publicized speech meant to clarify his immigration policy. The GOP nominee has come under fire recently for seemingly flip-flopping on his proposed policies. Democratic nominee Hillary Clinton has urged voters not be distracted by Trump's Mexico visit and to stay focused on his policies towards Mexico and Mexican immigrants.

"[Trump] has painted Mexicans as ‘rapists’ and criminals and has promised to deport 16 million people, including children and U.S. citizens. He has said we should force Mexico to pay for his giant border wall," read a statement from Clinton's campaign, according to the Washington Post. "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."