(Bloomberg Opinion) -- Few talked about Northern Ireland during the Brexit referendum. Yet it could now dash Prime Minister Theresa May's hopes of a deal with the European Union and threaten 20 years of peace and prosperity in Ireland.

A coalition of hardliners within May's Conservatives and a small party from Northern Ireland that has provided her parliamentary majority since last year's election is poised to nix her proposed deal. It includes a guarantee to keep the border between Northern Ireland and Ireland free from customs checks no matter how the future trade relationship between the U.K. and EU turns out – something detractors say risks keep Britain within the EU customs union permanently.

If Arlene Foster's Democratic Unionist Party stymies that agreement, it would mark an unprecedented win for what was once a fringe group on the British political scene. But in the long term it could actually promote the very idea the DUP opposes above all else: a united Ireland. While the party supports Brexit, Northern Ireland voted 56 percent in favor of remaining in the EU, well above the national 48 percent remain vote.

While no one is seriously suggesting a return to the sectarian conflict of the Troubles, the history adds a measure of uncertainty and instability that the rest of the U.K. should find deeply unsettling.

The border between Northern Ireland and the larger Republic of Ireland to the south is the U.K.'s only land border with the EU. The 1998 Good Friday agreement that ended the 30-year paramilitary conflict created a permanent, open border between the two. Essential to that was that both sides of the border were EU members sharing a common customs and regulatory system. After Brexit, differing regulatory and tariff regimes, as well as immigration requirements, would make monitoring necessary.

Foster will look askance at the enhanced regulatory checks, especially on agricultural products, that EU negotiator Michel Barnier says must take place between Northern Ireland and the rest of Britain. Treating the province differently from the rest of the country would, in her view, be unacceptable.

Of course, some checks already exist. But she is threatening to vote down the budget this month if she’s unhappy with what May agrees at an EU summit next week. That might not topple the government – but it would make it very tricky to govern, and potentially impossible if hardline Conservative Brexiters also decide to rebel.

While trust has been built up over the past two decades, peace in Northern Ireland remains fragile. Few outside the province realize how divided communities there remain even after all the progress and prosperity of the last two decades. The rise of the DUP and its nationalist counterpart Sinn Fein at the expense of their rivals mirrors the growing polarization of politics in Northern Ireland.

There are starkly different narratives of the Troubles, and we know from many other places – from the Balkans to Eastern Europe – that historical narratives can shape politics in fierce ways.

Negotiations over inquests into what are referred to as “legacy” issues have repeatedly bedeviled co-operation. More than 100 “peace walls” still separate Catholic and Protestant communities; the plan to remove them by 2023 looks wildly optimistic right now. Efforts to integrate an education system divided along religious lines have faltered. Public-sector housing estates are also deeply divided.

The Stormont Assembly, the power-sharing arrangement set up by the Good Friday Agreement, has been suspended since January 2017, after republican and unionist parties fell out. Religious leaders from both communities warn of a widening of divisions; and violence around the regular parades, such as the July 12 commemoration marking the victory of William of Orange over the Catholic James II, is a reminder of that past.

The Good Friday Agreement left the door open to Irish reunification if a majority of both Northern Ireland and Ireland voted for it in a referendum. That begins to look less far-fetched with Brexit, something that terrifies the DUP – especially as the faster-growing Catholic population is evening up the demographic balance with the protestant community.

For many, the lack of understanding in the rest of the country about how Brexit might be used to undermine what has been achieved in the province is exasperating.

“Neither Sinn Fein nor the DUP truly believe in a settlement based on multiple identities or pooled sovereignty – the kind facilitated by EU membership,” according to Matt O’Toole, a Northern Irishman who was chief press officer for Europe at 10 Downing Street during the referendum campaign. “Both now want to achieve something from Brexit that is less of a compromise than what existed before.” 

O’Toole noted a year ago that nobody was listening; it’s actually worse than that. More than four out of five leave voters and 73 percent of Conservative voters agreed with the statement that unraveling the peace process in Northern Ireland would be worth it to “take back control," according to a recent YouGov poll.

And why stop there? Scotland voted in favor of staying in the EU. And almost 90 percent of leave voters agreed that losing it would be worth it to take back control from the EU.

The genius of the Good Friday Agreement was that it offered both dignity and tangible benefit to both sides while fudging the question of loyalty. It was possible only because both sides had more to gain through an agreement than fighting. The U.K. and EU negotiators may be ready to do a deal – but there’s no sense that those with a stake in the Brexit negotiations have reached a similar conclusion.

To contact the author of this story: Therese Raphael at traphael4@bloomberg.net

To contact the editor responsible for this story: Edward Evans at eevans3@bloomberg.net

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Therese Raphael writes editorials on European politics and economics for Bloomberg Opinion. She was editorial page editor of the Wall Street Journal Europe.

©2018 Bloomberg L.P.