So what the hell has happened now with Brexit?

EU and UK negotiators have agreed a final deal in Brussels that would allow the UK to leave the EU – possibly by the October 31st deadline, if ratified – more than three years after the UK voted to leave the EU. The deal would avoid a hard border on the island of Ireland, a condition set by both sides in December 2017.

Wait, was there not a Brexit deal agreed before?

Yes, but the so-called backstop to avoid a hard border in the original Withdrawal Agreement was rejected by the House of Commons three times, ultimately forcing British prime minister Theresa May out of office. This left it to her successor Boris Johnson to try another route.

What did he propose?

He suggested a “two borders” plan where Northern Ireland would remain aligned with the Republic on EU single-market rules covering the movement of goods, including – most importantly for the island economy – food. This would create a regulatory border in the Irish Sea. The EU liked this but rejected his idea to take Northern Ireland out of the EU customs union with the rest of the UK as it would create a second border, a customs border, in Ireland. It did not like the plan to permit Northern Ireland to vote every four years to opt into this because it would have given Northern Ireland’s pro-Brexit Democratic Unionist Party a veto.

What has been agreed in this new deal announced today?

The UK has accepted that there cannot be a customs border on the island of Ireland so it has come up with a new plan: Northern Ireland will remain in the UK customs union after Brexit but the UK has accepted that the North will be subject to EU customs rules and the oversight of EU authorities, including the European Court of Justice (something previously rejected by Brexiteers). This, along with the Irish Sea regulatory border for goods, would avoid a hard border on the island of Ireland. In other words, regulatory and customs checks and controls would take place at ports on the Irish Sea on goods moving from Britain to Northern Ireland.

Is this not the same as the original Northern Ireland-only backstop proposed and rejected last year?

Kind of. The new deal achieves the same objectives as that proposal but by different and far more complex means. The EU has shifted its position on this original backstop by agreeing to permit Northern Ireland to remain legally in the UK customs union but operationally and practically in the EU customs union.

Revised Withdrawal Agreement

Tánaiste Simon Coveney (left) shakes hands with EU chief Brexit negotiator Michel Barnier. Photograph: John Thys/AFP via Getty Images

What?! How is this possible?

It’s complicated. Under the deal, the UK would collect tariffs for the EU on goods heading into Northern Ireland. Businesses and traders in Northern Ireland would be permitted to claim refunds on the difference on tariffs if the goods remain in the North or are re-exported back into the UK. If the UK agreed trade deals with other countries after leaving the EU, Northern Ireland businesses would be able to offset the tariff differences in their claimed refunds to benefit from those future trade deals. This was important to Johnson so that the whole of the UK, including the North, could profit from future trade agreements, one of the objectives of Brexit for the Leave camp.

How have they solved the consent issue on Northern Ireland having a say on these arrangements?

The UK has agreed to drop what the EU argued would hand a veto to the DUP. It is proposed that the Stormont Assembly, Northern Ireland’s parliament, be “provided the opportunity for democratic consent” to the arrangements – rather than a vote to opt in under Johnson’s original proposal – of new arrangements by a simple majority of the assembly. The new arrangements would come into effect for four years from the end of the transition period on December 31st, 2020. In other words, the first vote to opt out of/stay in these arrangements by a simple majority would take place four years after this date. The UK must provide the opportunity for a first vote of the assembly within two months of the end of the initial period, December 31st, 2024, so the first vote would have to take place by October 31st, 2024.

What happens if the Northern Ireland Assembly votes to opt out of/stay in these arrangements?

There would be a two-year cooling-off period when the EU and UK, through a joint committee set up under the Brexit deal, would have to find another way of meeting the conditions of the 1998 Belfast Agreement, the treaty underpinning the Northern Ireland peace process, and avoiding a hard border being set up on the island of Ireland. If Stormont votes on the basis of a cross-community majority and the vote did not pass, another opt-out/stay-in vote could not take place for another eight years.

DUP leader Arlene Foster and deputy leader Nigel Dodds in Westminster, London. File photograph: Stefan Rousseau/PA Wire

What constitutes a cross-majority in the Northern Ireland Assembly?

Cross-community support means a majority of members of the assembly who are present and voting, including a majority of the unionist and nationalists who are present and voting in the assembly. It also means a weighted majority of 60 per cent of the members of the assembly, present and voting, including at least 40 per cent from each of the unionist and nationalist communities.

How would this work, given that Stormont has not sat since January 2017?

Again, it’s complicated. If Stormont does not sit or collapses during the decision-making around whether to opt-out/stay-in, then the arrangements set out in the Brexit deal would continue to apply, so this might serve as an incentive for Northern Ireland’s politicians to agree to restore the power-sharing assembly. If it does not, the UK government has said in a separate “unilateral declaration” published today that it would provide “an alternative democratic consent process” by members of the Northern Ireland Assembly if it was not possible to hold a vote in the assembly itself, and that this process would allow for the continuation of the post-Brexit arrangements.

Were there other sticking points that have been smoothed over?

Yes, particularly on the issue of VAT. This needed to be solved because by not aligning north and south on VAT it could create another border on the island of Ireland and lead to all sorts of complications around smuggling and the protection of the integrity of the EU single market, given that the Border will be a new economic frontier after Brexit. The UK has agreed EU law will apply on VAT and excise in Northern Ireland and that the UK will be responsible for collecting VAT and excise duties. The UK may apply VAT exemptions and reduced rates applicable in Ireland to supplies of goods moving across the island by way of derogations.

Is there any other significant change in today’s announcement out of Brussels?

In one major shift, Johnson has agreed to retain the “robust” commitment made by Theresa May to a level playing field in the areas of state aid, competition, social and employment standards, environment, climate change and relevant tax matters. He has also committed to the EU and UK agreeing to a free-trade agreement that would have no tariffs. In other words, Johnson has agreed to align the UK closely to the EU on a number of different fronts after Brexit. It is a big departure for Johnson and a shift away from his “Singapore on Thames” plan that was designed to undercut the EU significantly to make the UK more competitive. Crucially, this commitment is contained in a side document known as the “political declaration”, a kind of road map setting how the EU and UK might agree a future trading relationship. However, notably, this document is not legally binding.

So does this deal change matters and will the UK actually exit the EU?

That is the million-dollar question. We have been here before. This deal still has to be ratified by the House of Commons and that will come down to parliamentary arithmetic and whether Johnson has enough votes to get it over the line. The DUP, on which Johnson relies for support, has said that they do not support the proposed deal, so – without the backing of the House of Commons – we could be back to square one: no deal.

What would happen then?

It is hard to say. Legally, Johnson is obliged to seek an extension but that would run counter to his pledge to “get Brexit done” by October 31st. There could be an extension and a UK general election around this deal and it is anyone’s guess what could happen next given the uncertainty Brexit has caused in British politics.