BELFAST (Reuters) – Irish nationalists and pro-British unionists in Northern Ireland began talks on Monday to restore devolved government to the province at a time when the United Kingdom’s imminent departure from the European Union threatens the already delicate political balance.

Northern Ireland has been without a devolved administration for almost three years.

Sinn Fein, the largest nationalist party, withdrew in January 2017 saying it was not being treated as an equal partner. Since then Sinn Fein and the largest pro-British party, the Democratic Unionist Party, have blamed each other for the failure to restore a power-sharing government.

But voters punished both in the British election last week, raising pressure on their leaders to cut a deal.

Prime Minister Boris Johnson’s emphatic election victory means that Brexit is now a certainty. But Northern Ireland, the only one of the United Kingdom’s constituent countries to have a land border with an EU nation, is exposed to many potential negative consequences.

Unionists, who want Northern Ireland to remain British, fear Johnson’s decision to align Northern Ireland with EU market rules to keep the border frictionless may undermine its place in the United Kingdom and pave the way to a United Ireland.

Irish nationalists, who seek a union with the Republic of Ireland, say EU membership and the open borders it allowed was a main ingredient in the 1998 peace agreement that ended largely 30 years of sectarian and political violence.

Since the Brexit referendum they have increased calls for Irish unification.

Speaking just before the talks on the government arrangements began, DUP leader and former First Minister Arlene Foster said there was “every chance” of an agreement.

“If there is a will there is a way,” she told BBC Radio.

Failure to reach a deal by a Jan. 13 deadline would trigger elections in the region and if that failed to break the deadlock, the British government would have to consider imposing direct rule from London, a move that would infuriate the nationalists.

The nationalists are seeking increased rights for Irish speakers and a reform of the system of governance to avoid the DUP, the largest party, from blocking legislation using a clause from the 1998 peace deal to protect minority rights.

The DUP says Sinn Fein is holding Northern Ireland to ransom.

The two remain Northern Ireland’s largest parties, but their vote fell 6.7 and 5.4 percentage points respectively in last week’s UK election as voters shifted to the non-aligned Alliance Party.

“I hope that as of last week people recognize what the public want,” Alliance leader Naomi Long told reporters on the way into the talks, citing widespread demands for devolution to be restored to tackle crises in health and education.

The importance of the assembly has increased following a provision in Johnson’s Brexit withdrawal agreement that will give the Northern Ireland assembly the right every four years to consider whether to maintain alignment with EU market rules.

The parties each had a meeting with the British government’s minister for Northern Ireland, Julian Smith, before round table talks begin on Wednesday.

Writing by Conor Humphries, Editing by Angus MacSwan