LIMERICK, Ireland — Shortly after arriving in Ireland on Wednesday, President Trump compared the Irish border to the U.S. border with Mexico and told Prime Minister Leo Varadkar that the tortured Brexit process is “going to be just fine.”

“Ireland’s going to be in good shape,” he said during a meeting with Varadkar at the airport in Shannon, Ireland, a location that allowed him access to his golf resort nearby. “I don’t think the border’s going to be a problem at all.”

Answering questions from reporters, Trump appeared to downplay what is possibly the most contentious issue in Brexit negotiations.

Tearing down border checkpoints between Ireland and Northern Ireland helped to end decades of deadly conflict in the North. The fear is that the emergence of a hard border, once Northern Ireland leaves the European Union along with the rest of the United Kingdom, could both disrupt close trade relationships and reignite violence.

Trump compared the Irish border, which politicians are striving to keep invisible, to the U.S. southern border, where he has pledged to build a wall of steel.

“It will all work out very well, also for you, with your wall, your border,” he said. “We have a border situation in the United States, and you have one over here.”

Varadkar, sitting beside him, pushed back: “I think one thing we want to avoid, of course, is a wall or border between us.”

The president appeared to accept that, saying that “the way it works now is good.”

Trump said he and Varadkar planned to discuss a range of topics, including Brexit, immigration, trade and cybersecurity concerns about Chinese telecom firm Huawei. 

But the president also had to combat the notion that his visit to Ireland was little more than a promotional opportunity for his golf club at Doonbeg.

One Irish journalist asked Trump directly whether his trip was primarily for commercial purposes.

“No, this trip is really about great relationships that we have with the U.K.,” he said. “I really wanted to do this stop in Ireland. It was really important to me, because of the relationship I have with the people, and with your prime minister.”

Ireland has not been part of the United Kingdom since 1922.

It was the latest stop on Trump’s trip to Europe, following a British state visit that included meeting with Queen Elizabeth II and dining with members of the royal family. Earlier Wednesday, Trump joined British royalty and leaders from around the world in Portsmouth, England, to commemorate the 75th anniversary of D-Day and honor the men and women who participated in what is still the largest naval, air and land operation in history.

While much of Trump’s trip has been dominated by pomp and circumstance at ceremonial events, Brexit has loomed large. Trump has praised far-right Brexit leader Nigel Farage, criticized outgoing Prime Minister Theresa May for her handling of the negotiations and suggested that Britain could crash out of the E.U. without major consequences.

Many of those vying to succeed May have been supportive of the no-deal option. But economists project that leaving the E.U. abruptly without a deal to manage the withdrawal would wreak havoc.

Trump did have some positive news to offer, as he said he had personally been lobbying for new legislation that would open up more U.S. visas to Irish citizens. Varadkar had brought up the issue of E-3 visas in March during his meeting with Trump in Washington. The visas, which are currently available to Australians, would allow about 5,000 additional Irish citizens to come to the United States each year, under legislation pending in Congress. 

Similar legislation was expected to pass last year, but it failed after a single senator, Tom Cotton (R-Ark.), objected.

“We are looking at that, we almost made it last time, it was one vote,” Trump said. “I spoke to the one vote, who is a great senator by the way, he really is, he’s a great senator, and we think we are going to be successful.”

Trump was also asked about Irish President Michael Higgins’s recent comments about his “regressive and pernicious” record on climate change.

Higgins’s remarks, delivered Tuesday at a conference of the European Federation of Public Service Unions, took the Trump administration to task for opting to pull out of the Paris climate agreement.

Trump said he hadn’t heard about the comments from Higgins. In an interview with British broadcaster Piers Morgan that aired Wednesday morning, Trump asserted that the climate “changes both ways.”

The president plans to travel to France on Thursday to commemorate the 75th anniversary of the D-Day beach landings in Normandy. After visiting an American cemetery and meeting with French President Emmanuel Macron, he will return to Ireland and spend another night at his golf resort.

Ferguson reported from Shannon, Ireland.