The European Council has approved the new Brexit Withdrawal Agreement trashed out by negotiators in recent days.
The deal still has to be approved by all 28 European Member States.
Attention will now turn to whether the British Government can get the deal through the House of Commons.
The DUP has warned that it will not support the deal; meaning the UK Prime Minister will struggle to find the numbers to get it past.
A number of hard-line Tory Brexiteers have previously indicated they will consider the DUPs stance before making their own decisions on whether to back the deal.
Negotiators have been engaged in “intense” talks for the past six days and it emerged at around 11:30am Brussels time that an agreement had once again been reached.
"Fair and balanced"
The EU said the revised withdrawal agreement and political declaration offer a "legally operational solution that avoids a hard border on the island of Ireland."
Northern Ireland would stay in the UK customs union but would collect tariffs on behalf of the EU to protect the single market.
The revised political declaration says the North would remain aligned to a "limited set" of single market rules to avoid a hard border - including on VAT and excise rules.
Members of the Northern Ireland Assembly will be given a "decisive voice" after four years on the long-term application of those rules - with the European Commission saying they've been in close contact with the Irish government over the issue.
However, the DUP said the proposals were "not, in our view, beneficial to the economic well-being of Northern Ireland and they undermine the integrity of the Union".
"Good for Ireland"
Taoiseach Leo Varadkar described the new arrangements as "good for Ireland and NI".
He described it as a "unique solution for NI that respects unique history and geography" - adding that the deal would avoid a hard border.
Leo Varadkar in Brussels
- good deal
- backstop has been replaced
- compromise never has one father
- wouldn’t get into DUP position pic.twitter.com/racQRdEEOw— Seán Defoe (@SeanDefoe) October 17, 2019
In a letter to Council President Donald Tusk, the European Commission President Jean-Claude Juncker said negotiators had agreed a "fair compromise".
🇪🇺🤝🇬🇧 Where there is a will, there is a #deal - we have one! It’s a fair and balanced agreement for the EU and the UK and it is testament to our commitment to find solutions. I recommend that #EUCO endorses this deal. pic.twitter.com/7AfKyCZ6k9
— Jean-Claude Juncker (@JunckerEU) October 17, 2019
He said: "The negotiators reached an agreement on revised Protocol on Ireland / Northern Ireland and on a revised Political Declaration on 17 October 2019.
"Both were endorsed by the European Commission. The Prime Minister of the United Kingdom also signaled his approval of these documents to me today."
During a press conference with Boris Johnson, Mr Juncker suggested there's no need for a 'any kind of prolongation' of the Brexit process now that there's a new deal.
However, any extension if the deal's rejected would ultimately be up to the European Council.
The EU's chief negotiator Michel Barnier said the deal followed "difficult discussions over the past days".
He suggested: "We have managed to find solutions that fully respect the integrity of the Single Market. We created a new and legally operative solution to avoid a hard border, and protect peace and stability on the island of Ireland.
"It is a solution that works for the EU, for the UK and for people and businesses in Northern Ireland.”
Boris Johnson, meanwhile, said: "We’ve got a great new deal that takes back control — now Parliament should get Brexit done on Saturday so we can move on to other priorities".
Westminster
The new deal will now need to make it through the Houses of Parliament in the UK, with a rare Saturday sitting to take place in the wake of this week's European Council summit.
Mr Johnson has been keen to win the support of the DUP to pass the agreement, as opposition parties are unlikely to back it.
Arlene Foster's party issued a warning this morning saying they could not agree to the deal, and say that is still their position.
They suggested in a statement this afternoon that the arrangements "drive a coach and horses through the professed sanctity of the Belfast Agreement".
They add: "It is our view that these arrangements would not be in Northern Ireland’s long term interests.
"Saturday’s vote in Parliament on the proposals will only be the start of a long process to get any Withdrawal Agreement Bill through the House of Commons.”
The Northern Irish party had earlier raised concerns about "customs and consent issues", as well as a "lack of clarity" on VAT.
⬇️⬇️⬇️ pic.twitter.com/zpReVsavVu
— DUP (@duponline) October 17, 2019
UK Labour leader Jeremy Corbyn suggested the agreement appeared to be "an even worse deal than Theresa May’s, which was overwhelmingly rejected".
He added: “This sell out deal won’t bring the country together and should be rejected. The best way to get Brexit sorted is to give the people the final say in a public vote.”