There were protestors outside the talks and someone was leaking the details from inside but it did not thwart breakthrough.
Sir Jeffrey Donaldson emerged from a lengthy meeting of the DUP Executive with support for a deal to restore power-sharing.
He said his party would end its boycott of devolved government once the UK government honoured commitments it has made.
The government is now expected to table legislation to address Unionist concerns about the Brexit border in the Irish Sea.
The legislation is designed to strengthen Northern Ireland’s place in the UK and limit the impact of the trade border.
The agreement is set to end two years of stalemate at Stormont and comes after months and months of negotiation.
Unionists felt betrayed when Boris Johnson agreed to a trade border between GB and Northern Ireland to “get Brexit done”.
DUP agrees deal with UK government to restore power-sharing to Northern Ireland
Train strikes this week: Full list of dates in January and February 2024 and rail lines affected
Women working in music industry face ‘endemic’ misogyny and discrimination, MPs say
The previous year, he had told the DUP conference that no British prime minister could ever countenance such a move.
Frustrated by what they regarded as a threat to Northern Ireland’s position within the UK, Unionists pulled out of power-sharing.
Rishi Sunak’s new deal with the EU – the Windsor Framework – addressed some, but not all, of their concerns about sovereignty.
Read more: 150,000 public sector workers walk out in Northern Ireland’s biggest strike in recent history
But a crisis in public services in Northern Ireland has piled pressure on the Democratic Unionists to restore devolved government.
Earlier this month, the UK government pledged an eye-watering £3.3 billion to support the efforts of any new Stormont administration.
Rishi Sunak can take much credit but this complex deal represents a huge leap of faith by Sir Jeffrey Donaldson.
Jamie Bryson, a loyalist activist and fierce opponent of compromise, was live tweeting from a DUP source inside the meeting.
Be the first to get Breaking News
Install the Sky News app for free
But the party leader has faced down his critics to restore the power-sharing at the heart of the peace process.
“It’s all over bar the shouting,” one DUP source said, and there will be plenty of noise about this decision.
But Northern Ireland seems set to have a devolved government in place within days and that signals a historic moment.
Sinn Fein’s Michelle O’Neill, who topped the poll in the election, is poised to become the first Nationalist First Minister.