The British and Irish premiers will travel to Northern Ireland today to formally announce details of the deal to save the region's power-sharing government.
Nearly two weeks of round-the-clock negotiations ended in success late last night when Democratic Unionist Party (DUP) members of the Stormont Assembly agreed to back the deal brokered with Sinn Fein.
The settlement will see the devolution of policing and justice powers from Westminster to the Assembly within weeks, satisfying a key republican goal, while new arrangements for overseeing loyal order parades will meet the demands of unionists.
The talks which centred on Hillsborough Castle, Co Down, are the longest set of continuous negotiations held in the near 20-year peace process.
Prime Minister Gordon Brown and taoiseach Brian Cowen will return to the venue today to meet all of Northern Ireland's main political parties before unveiling the terms of the accord.
With Sinn Fein accusing the DUP of stalling on the transfer of policing powers for the last three years, it was feared that failure to find agreement could see the collapse of the power-sharing government led by the two parties.
The final piece in the political jigsaw that sealed agreement came at Stormont's Parliament Building last night as the clock in its Great Hall approached midnight. It followed Sinn Fein's announcement earlier that negotiations on policing, justice and parades had ended and republicans believed the basis for an agreement existed.
DUP leader Peter Robinson emerged from a late-night meeting of party colleagues to confirm that he had secured unanimous support for the proposals.
Flanked by DUP enterprise minister Arlene Foster and finance minister Sammy Wilson, Mr Robinson said all members of his party were behind the blueprint for agreement.
Emerging from the two-hour meeting, he said: "The assembly group asked questions and considered the matter and have unanimously supported the way forward.
"Everyone present believes this is consistent with our election manifesto and pledges that we have made to the people.
"We look forward to going to Hillsborough when the document should be published."
The DUP Assembly group met for their late-night talks at Stormont amid fears that some may have rejected the deal after an earlier meeting this week where a significant number dismissed proposals for an agreement.
Mr Robinson said he would now look to gain the support of the community and of the smaller Assembly parties for the deal.
The DUP leader said: "We have a basis upon which we can go forward and recommend it (the deal) to our party, to the other parties in Northern Ireland and to the community.
"An essential element of the Democratic Unionist Party's manifesto is the requirement for community confidence, we believe this can be the basis for gaining that confidence."
The DUP's executive is expected to ratify the decision made by its Assembly members later this morning.
Sinn Fein welcomed confirmation of the DUP decision.
The party's president Gerry Adams said: "I welcome the DUP's decision. We have been involved in what has been a lengthy stretch of negotiations.
"I commend the Sinn Fein negotiating team. I believe that the Assembly and political institutions can now proceed on the basis of equality, fairness and partnership. They also have to deliver for all citizens, that is the collective responsibility of all the political parties."
The announcement of a deal came a day after Mr Robinson stepped back into the First Minister's office.
On Wednesday night he announced he was resuming his full responsibilities as Northern Ireland's First Minister.
A series of probes are under way after it emerged last month that his wife Iris, former MP for Strangford, secured £50,000 from two property developers to start a business for her teenage lover.
Mr Robinson, said to have known of the financial deal, revealed the first of those reviews, a legal opinion compiled by a senior lawyer, found he had not breached any code of office.
Alliance Leader David Ford, tipped to be a compromise candidate outside unionist and republican ranks likely to become the future Justice Minister after devolution, welcomed the DUP decision.
He said: "I strongly welcome the fact that the justice deal has been unanimously backed by the DUP Assembly team.
"This is what the people of Northern Ireland have waited so long to hear and it means that the Executive can get back to the real work of providing quality services and strengthening our economy.
"We my face a few challenges in the coming months as regards the justice devolution process, but I am very hopeful that this will signal a new, more positive era for Northern Ireland."
But leader of the hardline Traditional Unionist Voice, Jim Allister, who is an arch critic of the DUP, asked why party members who rejected proposals at the start of the week, had now come on board with the plan.
He said the deal secured a key policy goal for republicans, who want to see as many powers as possible transferred away from London and towards Belfast.
"The deal the DUP so meekly accepted is the same deal they rejected on Monday," he said.
"The deal hasn't changed, only the snowmen of the DUP, who melted once the heat came on."