The EU's chief Brexit negotiator, Michel Barnier,has hailed the last-minute Brexit deal struck with Britain ahead of a crunch summit as a reasonable compromise that protects European interests.

"We have reached an agreement that is fair and reasonable and corresponds to our principles," Mr Barnier told reporters, but urged caution as the deal must still pass through the British parliament - which has rejected a Brexit deal three times before.

Speaking at a press conference in Brussels, he said the Brexit process has been a "school of patience" and said that he hopes that from 1 November, the EU can start working on a new partnership with the UK.

He said the British government wanted to re-open the question of the protocol on Ireland and Northern Ireland, and the EU was fully committed to "project peace" to ensure stability on the island of Ireland.

"When discussing Northern Ireland, we discuss the economy, technical matters and goods but for me since day one three years ago what really matters is people. The people of Northern Ireland and Ireland. What really matters is peace."

Mr Barnier said it included a legally-binding solution to avoid a hard border, preserve the whole-island economy and protect the integrity of the single market.

"It was extremely important to Prime Minister Johnson that the whole of Northern Ireland remains in the UK customs territory," he said.

Read more:
Live updates as deal reached following marathon talks
EU-UK agreement on Brexit deal 'big step forward' - Coveney
Why the DUP will not support Johnson's Brexit deal

He said discussions "have been difficult over the last few days", but we have "delivered, and delivered together".

Mr Barnier said the solution rests on four main elements:

  1. Northern Ireland remains aligned to limited rules on goods - all applicable procedures on goods will take place at the points of entry into Northern Ireland and not across the island. In this respect, the UK authorities will be in charge of applying the EU customs code with Northern Ireland.
  2. Beyond applicable procedures, customs duties. Northern Ireland will remain in the UK customs territory and will benefit from UK future trade policy. But Northern Ireland will also remain an entry point into the EU single market. To square this circle, Mr Barnier said UK authorities can apply UK tariffs on products from third countries so long as those goods entering Northern Ireland do not risk entering the single market via the Republic. Those goods at risk of entering EU will be subject to EU tariffs.
  3. VAT issue. To avoid distortion of competition in single market have managed to achieve two objectives - to maintain integrity of single market and keep UKs wishes.
  4. Mr Johnson and Taoiseach Leo Varadkar wanted to ensure long term democratic support for the UK - four years after entering the protocall the elected members of NI will be able to decide by simple majority whether to continue applying relevant rules in Northern Ireland or not. This is the cornerstone of the newly-agreed approach.

Mr Barnier said this is no longer to be replaced by a subsequent agreement between the EU and the UK.

Mr Barnier's comments came after EU and UK negotiators agreed on two complex formulas on how both customs and consent will be managed in a post-Brexit future.

The arrangements will cover the two most controversial and contested elements of attempting to avoid a hard border on the island of Ireland.

While the overall revisions to the Withdrawal Agreement were held up over the VAT issue, negotiators managed to forge a deal on consent and customs.

The plan would mean a limited customs border on the Irish Sea, and a potential exit to the revised backstop which might only come about in carefully weighted circumstances.

The elements were finalised after several days of intense negotiations in which the UK attempted to reconcile a potentially hard Brexit with the need to avoid a customs border on the island of Ireland.

The new arrangements would mean Northern Ireland is legally in the UK's customs territory, but would apply the EU's rules and procedures on tariffs.

Northern Ireland would also be aligned with the rules of the single market for industrial goods and agri-food products.

That would mean both regulatory and customs checks and controls on the Irish Sea for goods going from Britain to Northern Ireland.

However, the extent of the controls would be reduced thanks to a series of tariff exemptions.

There would be an automatic exemption for personal goods and possessions carried by those travelling back and forth between Northern Ireland and Britain, or, for example, if an individual was moving house.

However, there would potentially be a broader category of goods and tradeable products that could be exempt from tariffs and controls if there was no risk whatsoever of such goods entering EU's single market across the land border.

These categories of goods would be decided on in the future by the Joint Committee of EU and UK officials by consensus.

More Brexit stories

The Joint Committee was established in the original Withdrawal Agreement as a way for both sides to manage the new arrangements.

The intensity and scope of Irish Sea checks would be limited by a risk-analysis. However, the EU would, through the Joint Committee, have a veto over which kinds of goods would enjoy an exemption from tariffs and controls.

There would also be a system of rebates for goods shipped from Britain to Northern Ireland if those goods attracted an EU tariff that was higher than the UK tariff.

Negotiators have also agreed how to manage the vexed question of consent, via a complex formula involving the Northern Ireland Assembly.

The mechanism essentially provides a qualified opt-out of the revised backstop arrangements.

Under the terms of the agreement, Northern Ireland would take on the new customs and regulatory regime for four years after the end of the transition period, which is due to conclude at the end of 2020.

At that point Stormont would have to take a view as to whether or not to opt out of the new arrangements.

If Stormont voted to opt out, then there would be a two-year cooling-off period, during which all sides would have to find an alternative way of complying with the Good Friday Agreement and avoiding a hard border.

If at the end of the two years no alternative was found, then the protocol would lapse, meaning Ireland would be back to a hard border scenario.

However, if the Stormont Assembly were to collapse during that period, then the default would be that the protocol arrangements would continue to apply.

There will also be important variations on how Stormont votes for a potential exit.

If Stormont decides to use a simple majority vote, which is seen as less favourable to the DUP, then if that vote to opt out does not succeed, then it would vote again four years later on an opt out.

However, if Stormont decided to go for a cross-community majority vote, which is seen as more favourable to the DUP, and the vote did not pass, then Stormont would have to wait another eight years before having another opt-out vote.

The arrangements are complex and are expected to draw criticism from all sides.