What exactly happens now that the UK has voted to leave the EU in its referendum? What does the law tell us?

The short answer is: initially virtually nothing. It will probably take up to two years for the major legal consequences to reveal themselves. A little-known provision of the EU Treaty – Article 50 – will govern the Brexit process during this time.

Article 50 looks deceptively simple. Briefly, it provides for the EU negotiating an agreement with a departing member, setting out terms. The European Commission, the EU’s executive body, negotiates this agreement and the remaining member states sign off on it once the European Parliament has given its consent.

When the Article 50 agreement enters into force, the EU treaties simply stop applying to the UK. And if agreeing a mutually satisfactory deal proves impossible, there is a fallback position. The EU treaties will simply stop applying two years after the UK first notified its intention to withdraw (a period that can be extended if needed).

The process all sounds straightforward. In reality, however, it will be anything but that.

Expect messiness

In the first place, Article 50 is very far from a simple case of the UK and its neighbours engaging in individual mutual negotiations. The negotiations will see the UK on the one side, and all the remaining member states collectively on the other. Within the EU side, we can expect hard bargaining, messy compromises and trade-offs between the remaining EU member state interests. Individual states will block agreement in one area unless they gain concessions in others. Nothing will be agreed until everything is agreed.

As regards to the UK side in any future Article 50 negotiations, very little is known. It is not even clear who will be in charge of the government conducting the negotiations – much less what they will want.

Some things are clear about the Article 50 negotiations, however.

1. The UK will be the weaker side in the negotiations because it needs access to the EU’s colossal single market.

2. If Britain wants access to the single market, it will have to pay with sovereignty: the more sovereignty the UK is prepared to sacrifice, the greater its access will be to the market (and vice versa).

3. Single market access will also involve allowing continued access to the UK market, including for migrants.

4. From the moment the Article 50 process starts, uncertainty – and the prospect that a good deal cannot be reached – is likely to hang over the UK and the EU alike like a toxic cloud. This will impact on financial markets. It will hit investment. It will hit the value of the pound.

5. The need to deter other moves to leave within the EU will toughen the EU’s collective stance against Britain – as will elections in France and Germany in 2017 – although enlightened commercial self-interest might simultaneously restrain EU members in favour of a more generous approach than would otherwise be the case.

6. Throughout the two years or more of the talks, the UK will remain an EU member – but a rather lame duck one, with little influence on its partners.

No design for Brexit

But Article 50 is only part of the story. Certainly, it will be used as the vehicle to take the UK out of the EU. But Article 50 agreements do not seem ever to have been intended to govern future relations between the EU and the UK.

Future relations will likely involve an entirely separate parallel agreement – requiring tortuous negotiations which could last years. Furthermore the UK will also have to negotiate trade deals with states outside the EU (meaning agreements with all non-EU WTO member states) – something of a daunting undertaking in terms of the time, the effort and the persuasive skills it will take.

After the UK leaves, the remaining member states will probably have to negotiate the revision of their internal institutional arrangements, which might involve treaty change.

Could a change-of-mind referendum by the UK be legally permissible, enabling it to back out of Brexit? The Irish electorate, after all, changed its mind twice, having voted down EU treaties in referendums. The point is not absolutely clear, but there is arguably no legal bar on the UK government rescinding its withdrawal notice under Article 50, should the UK change its mind, once it sees just how bad the final deal offered to it by the other member states in 2018 or later will be.

Article 50 envisages another intriguing possibility – that of the UK eventually applying to rejoin the EU. The idea that the UK, having left, might ever seek re-entry may now seem far-fetched. However, the disadvantages of non-membership for the UK are, if expert opinion is anything to go by, likely to be considerable. If such unpleasant predictions prove true, who knows if everlasting exile might not one day be abandoned in favour of re-engaging with “ever closer union” once again?