This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Donald Trump was greeted by Mexican President Enrique Peña Nieto with an earful on trade and the importance of ties between the US and its southern neighbor.

The Republican presidential candidate made a last-minute trip Wednesday to Mexico in his first visit after becoming the nominee to meet with a world leader — one who has publicly insulted him and criticized his immigration and border policies.

Peña Nieto began his remarks in Mexico City alongside Trump by saying the two held a constructive exchange of views even though “we might not agree on everything.” He then launched into a detailed explication of US-Mexican trade and the benefit to both countries delivered by the North American Free Trade Agreement — a common punching bag for Trump on the campaign trail.

Trump, who listened to his host’s long remarks with a somber look on his face while a woman stood beside him at the podium translating for him, said that Mexicans were “spectacular” people when it was his turn to talk.

But he laid bare disagreements between the two men when he said it was imperative to stop the “tremendous outlow” of jobs from the United States over the southern border, and that NAFTA had benefited Mexico more than the US.

He stood up for America’s right to build a “physical barrier or wall” on its territory to stop illegal immigration and drug traffickers.

Trump also said that the didn’t discuss “payment for the wall” that he has called on Mexico to build to stop illegal immigration into the US.

Trump’s lightning-speed visit with Peña Nieto takes place in the frenzied build-up to the GOP nominee’s speech in Arizona Wednesday night clarifying his murky policy on immigration.

Trump’s calls for deporting all undocumented workers, labeling many Mexican immigrants “rapists” and “criminals,” and plan to build a wall along the border — that Mexico would pay for — have earned him withering criticism from Peña Nieto, as well as many independents and moderate Republicans.

But they are central pillars of his campaign, which has galvanized his white working class base behind his White House bid. Those most fervently opposed to immigration have pushed back against the rumored “softening” in his stance that he could articulate on Wednesday night.

It is not unusual for presidential candidates to venture abroad during a campaign. Both Barack Obama and Mitt Romney made trips to bolster their foreign policy credentials in 2008 and 2012.

But Trump’s approach — like the rest of his campaign — is highly unorthodox. Presidential candidates do not typically show up in foreign capitals for talks with leaders without intense preparation and highly choreographed game plans. Often, the parameters of a meeting are settled in advance. This trip was announced Tuesday night.

In addition, they usually visit strong allies where they are assured of a warm reception that will make for positive media coverage rather than sitting down with a leader who has compared them to Hitler and has disparaged their policy proposals.

Trump’s style, however, is more impulsive and unpredictable. He has never met a foreign leader in an official capacity. So his trip represents something of a risk. Even though the meeting with Peña Nieto is private, he has no control over how the Mexican leader will address the public and how his officials will brief journalists about it afterward.

Any protests against his visit could also generate unfavorable publicity in the United States, detract from his speech on Wednesday and play into Democratic nominee Hillary Clinton’s assertions that he is not fit to represent the US on the world stage.

The trip was also unusual for not including his traveling press corps and coming against the advice of US diplomats.

The campaign’s decision to travel to a foreign country — one rife with security risks for a candidate who has stoked tensions with his rhetoric on Mexican immigrants — without reporters following close behind marks an unprecedented moment in the coverage of major party presidential nominees.

In addition, staff at the US Embassy in Mexico advised the Trump campaign against making such a hastily arranged trip, suggesting it would be logistically difficult to organize on such short notice, according to a source familiar with the discussions.

Still, even a picture of Trump and Peña Nieto together could go some way to enhancing the Republican nominee’s stature as a potential global leader among some voters — perhaps among the very swing state Republican moderates he desperately needs to court to cut his poll deficit to Clinton.

If he emerges from the talks to say he told Peña Nieto that he plans to build the border wall and present Mexico with the bill, Trump could offer himself some insulation against criticism from the most radical anti-immigration voters in his base should he ease his positions in his address.

Trump campaign officials said the goal of the visit was to cast Trump as presidential and to create a photo opportunity with him and the Mexican president. But one adviser also told CNN’s Sara Murray that the spur-of-the-moment trip also highlights how nimble the Trump campaign is and how responsive he would be to breaking developments as president.

“You’ve just got to throw in a little theater now and then,” the adviser added. But the campaign also acknowledged the risks of the trip.

Trump is “either going to have a very cordial … conversation with this guy and they’re going to say we can work together,” one adviser said, “or they’re going to have a meeting and this guy is going to blow Trump up afterwards.”

Peña Nieto said in a press conference with President Barack Obama in July at the White House that both candidates were welcome to visit.

He noted his “deepest respect” for Trump and Democratic opponent Hillary Clinton, and that “from right now, I propose going into a frank, open dialogue with whomever is elected.”

But it is far from certain that Trump will emerge with a positive photo op, given his deep unpopularity in Mexico and his host’s own tumbling poll numbers.

The Mexican president has 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 in March to a Mexican newspaper, according to Reuters.

“Hitler, Mussolini, we all know the result,” he said in explaining his comments in June, as reported by 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.”

The Mexican leader has also flatly rejected the idea that Mexico would pay for a border wall, telling CNN’s Fareed Zakaria in July that “there is no way that Mexico can pay (for) a wall like that.”

The White House also emphasized the high-wire act Trump had set for himself, comparing his visit to Mexico to Obama’s visit to Europe and the Middle East while he was a candidate in 2008.

“You’ll recall that when President Obama took that trip … one of the highlights, was a trip to Germany — where the President spoke in Berlin to a crowd of about 100,000 Germans who warmly received him and enthusiastically cheered his speech,” said White House spokesman Josh Earnest aboard Air Force One Wednesday. “We’ll see if Mr. Trump is as warmly received.”

Clinton also raised the stakes for Trump, noting that meeting foreign leaders and working with other countries was what she had done for four years as America’s top diplomat.

“You don’t build a coalition by insulting our friends or acting like a loose cannon. You do it by putting in the slow, hard work of building relationships. Getting countries working together was my job every day as secretary of state. It’s more than a photo op. It takes consistency, reliability.”

A senior Clinton aide said Wednesday that the former secretary of state had also received an invitation to meet Peña Nieto.

“Secretary Clinton last met with President Peña Nieto in Mexico in 2014 and our campaign is in a regular dialogue with the Mexican government officials,” the aide added. “She looks forward to talking with President Peña Nieto again at the appropriate time.”

Republican Vice Presidential nominee Mike Pence praised Trump for choosing to make the trip.

“It would have been very easy to say, let’s get together, let’s talk for days and days and figure out how to make this happen. Donald Trump is someone that says, we got an invitation, we’ve got an opportunity, let’s drop what we’re doing — he’s going to begin a relationship that I truly do believe is in the interest of the United States of America,” he told CNN’s Alisyn Camerota Wednesday.

Pence said that he expects Trump to be forthright about how he sees the United States relationship with Mexico, and to communicate the policies he intends to pursue if elected, reiterating those he’s outlined on the campaign trail.