Republican presidential nominee Donald Trump on Wednesday met Mexican President Enrique Pena Nieto, where the two downplayed differences and set aside harsh rhetoric.

“I was straightforward in presenting my views about the impact of current trade and immigration policies on the United States,” Trump said following the meeting in Mexico City, according to Bloomberg News.

“We all share a common interest in keeping our hemisphere safe, prosperous and free,” he added.

Trump said the two discussed Trump's proposal to build a wall between the two countries but not the Republican candidate's plan to make Mexico pay for it.

Pena Nieto call the conversation with Trump “open and constructive.”

“We may not agree on various topics, but your presence here shows that we have much in common,” the Mexican president was quoted as having said, adding, “The next president will find in my government a partner.”

The trip shines a spotlight on the Republican nominee’s fraught relationship with the Mexican leader and with U.S. voters of Mexican ancestry set to play an influential role in the November election.

Trump, when announcing his presidential bid last year, said that Mexico sends “rapists” to America. The Mexican president, for his part, stated that Mexico won’t pay for a U.S. border wall, like Trump says it will, and has likened the billionaire’s rhetoric to that of Adolf Hitler and Benito Mussolini.

The trip to Mexico came hours before Trump's speech on immigration policies, set to be delivered later Wednesday in Arizona. after he and his allies sent mixed signals about whether he is softening his positions for general-election voters. Meeting with a head of state may also help Trump appear more presidential to some.

Pena Nieto chided Trump for some of his remarks about Mexico during Wednesday's meeting, according to Bloomberg.

“Mexican people felt hurt by the comments that had been made but I am sure that his genuine interest is to build a relationship that will give both of our countries better welfare,” he said.

Pena Nieto also cited the benefits of trade between the two nations. Trump has criticized and vowed to renegotiate the North American Free Trade Agreement (NAFTA) among the U.S., Mexico and Canada. The Mexican president, while saying he's open to modernizing the accord, said it has kept jobs in North America.

Trump said he “shared my strong view” that NAFTA has been a bigger benefit to Mexico than it has been to the U.S.

The meeting at the Mexican president's compound in Mexico City was announced just hours before it took place, but the agenda was hammered out by both sides after five days of discussions, a Trump campaign official said.

Pena Nieto said he hoped to meet with Clinton, , the Democratic nominee and a former secretary of state under President Barack Obama.

White House spokesman Josh Earnest declined to comment on Trump’s trip other than to tell reporters traveling with the president to Asia for a summit, “The White House is not offering any advice to the Trump campaign.”