President Trump meets with Irish Prime Minister Leo Varadkar in Shannon, Ireland, on Wednesday. (Alex Brandon/AP)

President Trump is paying a brief visit to Ireland, where he met with Ireland’s “Taoiseach” (prime minister) Leo Varadkar. In his meeting, he said, “Probably you will ask me about Brexit because I just left some very good people who are very much involved with Brexit, as you know. I think that will all work out very well, and also for you with your wall, your border.” Varadkar was quick to correct Trump, saying, “I think one thing we want to avoid, of course, is a wall or border between us.” He was being diplomatic. The very last thing that Ireland wants is the border wall that Trump seemed to be suggesting.

Ireland does not want border controls

Brexit is the reason the Irish border is a political issue in the first place. The border between the Republic of Ireland and Northern Ireland (which is part of the United Kingdom) has always been politically vexed. After Ireland became independent, it fought a civil war over the question of whether Northern Ireland should be part of the new state, and Northern Ireland “republicans” spent decades committing terrorist offenses in pursuit of a united Ireland. However, the fact that the United Kingdom and the Republic of Ireland were both members of the European Union helped take some of the poison out of the border between Northern Ireland and the Republic. It was possible to remove border posts controlling the flows of goods and people, since these were not required between E.U. states.

Now that the United Kingdom is probably leaving the E.U., the border is becoming a big political issue again. Nobody wants to bring back border controls, least of all the Republic of Ireland, which fears that dissident republicans might use border controls to win support and stir up violence. Yet if the United Kingdom is no longer subject to the customs, immigration and market arrangements of the European Union, there is a clear threat of a return to a closed border.

The Irish border has been one of the biggest problems in Brexit

This is the complex problem that Trump has gotten himself entangled in. Trump believes very strongly that walls solve border problems. He doesn’t seem to understand how walls can create problems, too. Yet a wall — or any physical barrier — between Northern Ireland and the Republic would have massive political and economic consequences, undermining peace, and damaging an economy that now spans the whole island of Ireland.

It is likely that Trump got some of his misunderstandings from talking to pro-Brexit politicians in the United Kingdom just before coming to Ireland. Pro-Brexit politicians have been highly frustrated with the Irish border situation, because resolving the problem is one of the preconditions for a basic deal on Brexit. The deal Theresa May tried and failed to get through the British Parliament included a “backstop” — a commitment by the United Kingdom that it would agree to a special arrangement for the border between Northern Ireland and the Republic in the event it could not reach a full deal. Pro-Brexit politicians hated this arrangement because this would require the United Kingdom to stay subject to E.U. rules, leading them to vote down the proposed deal.

Trump’s misunderstanding won’t do much political damage

Trump’s comments were embarrassing for the United States because they revealed that Trump did not really understand the issues between the United Kingdom and Republic of Ireland. However, they are probably not going to do significant damage to relations among Ireland, the United Kingdom and the United States. Irish and British politicians have already priced in Trump’s inability to understand the nuances of Brexit. Indeed, his comments about the wall were more ambiguous and hence less obviously wrong than his previous suggestion that the United Kingdom should leave the European Union and then sue it.

Indeed, it is possible that Trump officials and family members have come away with a positive impression from the visit. While Trump is highly unpopular in Ireland, the official meeting with the Taoiseach took place in an airport VIP lounge, making protest difficult. Trump is now staying in his private golf course in the western part of Ireland. The inhabitants of the local village nearby are unlikely to make a ruckus, since they view his visit as an opportunity for profit.

Ireland’s priorities during the Trump visit were not to get Trump’s support in negotiations with Britain. They were to secure smaller concessions on issues such as immigration (Ireland has many undocumented citizens living in the United States) and to avoid major diplomatic catastrophe. Irish politicians and diplomats are probably breathing a quiet sigh of relief that the official part of the visit is over and that nothing terrible has happened.