Brexit is undermining Northern Ireland’s hard-won peace by creating tensions between Catholic and Protestant communities, Irish Prime Minister Leo Varadkar said Saturday, even as hopes rose for a solution to the Irish border problem that has deadlocked negotiations. 

“Brexit has undermined the Good Friday Agreement” — the 1998 peace deal that ended three decades of violence in Northern Ireland — “and it is fraying relationships between Britain and Ireland,” Varadkar said. 

“Anything that pulls the two communities apart in Northern Ireland undermines the Good Friday Agreement, and anything that pulls Britain and Ireland apart undermines that relationship,” he told Ireland’s RTE radio. 

Negotiations between Britain and the European Union over Britain’s departure from the bloc have stalled over the issue of the border between EU member Ireland and the U.K.’s Northern Ireland. 

Both sides agree there must be no customs posts or other barriers that could disrupt businesses and residents or undermine Northern Ireland’s peace. But they haven’t agreed on how to guarantee that — and Britain is due to leave the bloc on March 29. 

The border impasse has heightened fears that the U.K. might crash out of the EU without a deal on divorce terms and future relations, leading to chaos at ports and economic turmoil. 

The EU has proposed keeping Northern Ireland inside a customs union with the bloc to remove the need for border checks on the island. 

But Britain’s Conservative government and its Northern Irish ally, the Democratic Unionist Party, won’t accept that because it would mean customs and regulatory checks between Northern Ireland and the rest of the U.K. 

Britain wants instead to keep the whole U.K. in an EU customs union, but only temporarily. 

Although there has been no outward sign of a Brexit breakthrough, Irish and British officials say they are increasingly optimistic that a solution can be found. 

After meeting Friday with Irish Deputy Prime Minister Simon Coveney in Dublin, British Prime Minister Theresa May’s deputy, David Lidington, said negotiators were “very close” to an agreement. 

Coveney agreed there had been “a lot of progress.” 

“I think it is possible to get a deal in November,” he said.