Before Donald Trump proposed a 1,000-mile wall on the U.S.-Mexico border to stop migrants, he tried to build a two-mile barrier on a pristine stretch of Irish coast to rein in an ocean.

He didn’t succeed.

Irish surfers, weekend beachcombers, environmental scientists, local planners and even a microscopic snail got in his way. In December, Trump International Golf Links backed down from plans it had said were essential to protect the company’s lone Irish course — picturesquely nestled in dunes overlooking the Atlantic — from being swallowed by rising seas.

For a man who loves to win, the defeat — just a month after his election as president — has left a bitter taste. And despite the motley nature of the resistance, Trump seems to have singled out a lone culprit: the European Union, whose rules and regulations underpinned many of the objections.

In interviews and public statements, Trump has cited his tangle over the golf-course wall as Exhibit A in justifying a jaundiced view of the E.U. that puts him at odds with decades of bipartisan U.S. foreign policy.

Doonbeg, Ireland. A view of Trump International Golf Links & Hotel. (Griff Witte/Griff Witte/The Washington Post)

Previous presidents — Democrats and Republicans alike — have seen the E.U. as an essential partner in global stability and a bulwark against the self-interested nationalism that spawned two world wars. To Trump, the bloc’s environmental protection regulations were a threat to his exquisitely manicured fairways and putting greens.

“I found it to be a very unpleasant experience,” he told British and German interviewers last month after bringing up the wall dispute, unbidden, when asked his opinion of the E.U.

“A very bad experience,” he emphasized weeks later as he raised the issue at his first White House news conference.

The bureaucratic battle over a golf-course sea wall makes for an unlikely inflection point in geopolitical history. And yet in Europe, Trump’s hostility toward the union that backers credit with keeping decades of continental peace is seen as a potentially fatal blow.

European Council President Donald Tusk recently took the extraordinary step of including Trump on a list of threats to the already teetering E.U., right alongside China, Russia and radical Islam.

[Europe’s threat list includes jihadists, Russia — and Donald Trump]

The golf-course dispute, of course, is not the only explanation for Trump’s disdain. He has also criticized the E.U.’s status as a trading rival to the United States, the predominance within the bloc of German interests and its suppression of national identities.

But that a relatively minor spat at a golf course has any bearing on such a major foreign policy stance is baffling to some of those who battled the wall — especially, they say, because Trump has his facts wrong.

“He speaks as though it was the E.U. that stopped it. It wasn’t,” said Dave Flynn, co-chair of a local surfers’ group that opposed the sea barrier. “It’s amazing that such a big foreign policy decision like this could be made on such an ill-informed basis.”

The 18-hole golf resort in the west Irish village of Doonbeg is a relatively small and recent addition to Trump’s global business empire, which he signed over to his sons just before entering the White House.

Ironically, the resort was originally built with the help of a $4 million grant from the E.U. The money was intended to spur rural development. And for a time it did, drawing international tourists and more than 200 jobs to a village where cattle farming, fishing and a handful of pubs had been the mainstays of the local economy.

But by early 2014, just over a decade after opening, the resort was struggling, battered by the one-two punch of an Irish economy still reeling from the global downturn and severe winter storms that left the course badly damaged.

Trump’s company swooped in and bought it at a deep discount — reportedly for about $15 million.

That spring, Trump paid his new asset a visit. At nearby Shannon Airport, he was given a red-carpet welcome, complete with a harpist and a handshake from the Irish finance minister. In a radio interview, he said he would invest about $45 million in a dramatic upgrade and expansion of the resort’s facilities.

But as storms continued to pound away at the greens, it became apparent that any investment would come to naught unless the fragile and ever-shifting dunes upon which the course is built were better defended.

Initially, the company’s solution was to begin dumping piles of rock along the beach. But the work lacked the necessary permits from County Clare, and was halted.

Ultimately, Trump International put an audacious plan before the county council: a two-mile, 200,000-ton, 15-foot-high rock wall that would sharply divide the dunes from the adjacent Doughmore Beach.

“It was a quantum leap from anything we had seen,” Flynn said. “It was big and brash, just hugely shocking.”

Flynn, who works as a development manager, said that he has been surfing at Doughmore for more than 20 years. The wide, sandy, half-moon beach is regarded as the best surf spot in western Ireland, he said. “During the spring, summer and autumn, it’s perfect. It just tracks in waves.”

He and fellow club members quickly concluded that Trump’s wall would destroy their mecca.

“Nature doesn’t like hard lines,” he said. “The beach will erode at the front and the dunes will die at the back. They need to work together.”

Residents of Doonbeg, a tiny, verdant and windswept village on the Atlantic coast, took a different view. Trump International said it needed the wall to keep the resort open. With course visitors pumping money into the economy, ­locals rallied around Trump International’s plan.

[Graphic: 9 foreign policy issues the Trump administration will have to face]

“The scenery is beautiful here, but you can’t eat it. You need to build in order to survive and thrive,” said Rita McInerney, who owns a local cafe and general store and whose family has been in Doonbeg for seven generations. “Some people think we’re selling our souls by dealing with Trump International. But prospects are few and far between in an area like this. And the fact is it’s 200 jobs, plus the spinoff for local businesses.”

Coincidentally, Vice President Pence has ancestors who hail from Doonbeg, which has also helped to consolidate local support.

“Trump has kept the jobs here and kept the tourists coming in. He made a promise to the people of Doonbeg, and he made good on it,” said Hugh McNally, a local restaurant owner and Pence’s third cousin.

McNally said that much of the opposition to the wall was generated based on political opposition to Trump and that it came from outside the village.

Opponents acknowledge their outsider status but insist the objections they lodged with county planners are based on genuine concern for an important natural habitat. Some of the legal objections, though not all, were based on the site’s E.U. designation as “a special area of conservation” and a habitat for the narrow-mouthed whorl snail — a rare and protected species.

“If you damage the dunes, then you eventually eliminate the snail’s habitat,” said Tony Lowes, director of Friends of the Irish Environment. “They will go if a wall is put in place.”

Trump has fumed at such arguments, calling them “environmental tricks to stop a project from being built” in an interview with the Times of London and Germany’s Bild.

He also said his company had received “the approvals very quickly from Ireland and then Ireland and my people went to the E.U. to get the approval. It was going to take years.”

The reality, however, is that E.U. approval was never needed, and Irish approval was never given. The project was stalled at the county level — with planners weighing objections based on ­local, national and E.U. law. A petition at the national level was rejected.

Trump encouraged Britain to leave the E.U., and has said he believes other members will follow. After the Brexit vote last June, he hailed the decision in a ribbon-cutting at one of his Scottish golf courses, Turnberry, saying the vote was “a positive” because it would depress the value of Britain’s currency.

“When the pound goes down,” he said, “more people are coming to Turnberry.”

That’s proved correct. The course has seen an upturn in business.

So has Doonbeg, with the course benefiting from what its general manager, Joe Russell, said is an investment of over $25 million in upgrades since Trump International bought it.

But the resort will not be getting the rock wall — at least not as originally planned. Just weeks after Trump’s victory in November, the company withdrew its proposal rather than answer 51 questions posed by county planners. Russell said the decision was made because approval would have taken “years” that “the company does not have.”

Instead, Trump International has proposed two smaller walls, which together are less than a third the size of the original. “We hope [the new plan] will proceed through the planning process quicker,” Russell said.

But the battle continues. Many of the same groups that opposed the original wall have objected to the new plan, arguing that when the smaller barriers inevitably fail, Trump International will be back demanding bigger ones.

“Sea walls,” Lowes said, “beget sea walls.”

Karla Adam in London contributed to this report.

Read more

A year ago, Britain’s Parliament debated banning Trump. Now he’ll be a guest of the queen.

When Theresa meets Donald: A geopolitical odd couple with big implications for the West

After Trump pledges ‘America first,’ the world responds with protests and dismay

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news