By a majority of over 1.25 million, the UK has voted to leave the EU. Our close neighbours thus join the people of Greenland as the only jurisdictions to reject EU membership in a referendum. Brexit has already had, and will continue to have, major political and economic implications for the UK itself but also for Ireland and the rest of the EU. This vote will also have important legal consequences.

As Prime Minister Cameron acknowledged in his resignation statement, it will be for his successor to trigger the formal process for UK withdrawal from the EU. The relevant mechanics are set out in Article 50 of the Treaty on European Union. Prior to the adoption of this Treaty, there was no formal mechanism for a Member State to leave the EU.

Article 50(1) provides that any Member State has the right to withdraw from the EU in accordance with its own constitution requirements. While, from a strict UK legal perspective, the result of the referendum is not legally binding on the UK Government, Prime Minister Cameron has made it clear that the wishes of the majority of voters will be followed.

The next step is for his successor to notify the European Council regarding the UK's intention to withdraw under Article 50(2). Given Mr Cameron's intention to remain in office for the time being, this notification is unlikely to be submitted to Brussels for a number of months at least. Indeed, Boris Johnson MP, one of the likely candidates to succeed Mr Cameron, has already suggested that there is no need for haste in terms of making an Article 50(2) notification. However, once such a notification is made, the EU must, under the guidance of the European Council, negotiate and ultimately reach an agreement with the UK setting out the arrangements for withdrawal. Any such agreement should also take account of the UK's future relationship with its soon to be former EU partners.

Article 218(3) of the Treaty contains further details on the mechanics of how the EU will approach the forthcoming withdrawal negotiations. As soon as the UK notifies the European Council of its decision to leave the EU, the European Commission will issue recommendations to the Council of Ministers (the Council) who will authorise the opening of negotiations. (The Council is not to be confused with the European Council, the latter does not have legislative power.) The Council will also nominate the head of the EU's negotiating team. The identity of this individual will obviously set a tone for the relevant discussions with the UK.

Ultimately, the withdrawal agreement will be concluded on behalf of the EU by the Council acting by qualified majority after obtaining the consent of the majority of the European Parliament. (Interestingly, UK MEPs do not appear to be excluded from voting on this issue.) The qualified majority system is defined as 72% or more of Member States representing at least 65% of the populations of those voting. In simple terms, this means that Ireland has no unilateral right of veto on any Brexit agreement. If it disagrees with the proposed withdrawal arrangement with the UK, the Irish Government will need to persuade a number of other Member States to support it. (Needless to say, the UK is prevented by Article 50(4) from participating in any relevant Council votes.)

Under Article 50(3), the UK will formally leave the EU on the day the withdrawal agreement enters into force or two years from the date of submission of the formal Article 50(2) notification. However, this period may be extended indefinitely provided the UK and all of the other Member States agree. While there was no formal EU legal mechanism at the time, it took Greenland three years to negotiate its departure from the then European Economic Community following a 1982 referendum. This withdrawal was triggered by a dispute on fishing rights. By contrast, Brexit gives rise to an array of complex issues. Accordingly, the EU's negotiating team and the UK's next Prime Minister will need to prepare themselves for the long haul.

As appeared in the Irish Times, 24 June 2016.