The main Irish Republican and pro-British unionist parties in Northern Ireland agreed to return to a power-sharing government after a three-year hiatus, ending a standoff that had threatened a key part of the province's 1998 peace settlement.
Sinn Fein, the largest nationalist party, followed the Democratic Unionist Party, in backing a draft deal brokered by the Irish and British governments to end the devolved assembly's suspension.
London had taken on greater administrative responsibility for the British province as the parties to break the deadlock. They had faced the threat of fresh elections if a deadline on Tuesday passed.
"We now have a basis for power sharing and we're up for that," Sinn Fein leader Mary Lou McDonald said, almost three years to the day after her party walked out saying the DUP was not treating it as an equal.
"There is absolutely no doubt that there are serious challenges ahead but the most significant challenge will be ensuring we have genuine power-sharing, based on equality."
The importance of the devolved administration has increased because a provision in Britain's European Union withdrawal deal will give the assembly the right every four years to consider whether to maintain alignment with EU market rules.
The tortuous Brexit process had complicated talks in Belfast, with Irish nationalists wanting to remain in or close to the EU and unionists fearing such alignment could undermine the province its place in the United Kingdom and pave the way to a politically and economically united island of Ireland.
Land border with EU
Northern Ireland, which suffered through three decades of political violence before the 1998 Good Friday Agreement, is the only part of the UK to have a land border with an EU nation, and the divorce deal ensures its border with the Republic of Ireland remains open.
The DUP propped up a minority British government for more than two years until last month's snap election, another stumbling block in the talks with Sinn Fein that Prime Minister Boris Johnson's emphatic victory removed.
The two big Northern Irish parties' share of the vote fell in those elections, while budget issues in the health service, culminating in a strike by local nurses this week, also raised pressure on them to cut a deal.
Sinn Fein had been seeking increased rights for Irish language speakers and a reform of the system of governance to prevent the DUP, the largest party, from blocking legislation using a clause from the 1998 peace deal to protect minority rights.
The draft deal offers a new cultural framework to "protect and enhance" the Irish language, while meaningful reform of the so-called 'petition of concern' mechanism would mean it would no longer constitute a veto for one party.
The influential Orange Order, a pro-British "cultural" society that holds large annual parades and counts DUP politicians among its members, said it opposed the deal due to the "far reaching" Irish language provisions.