Since the foundation of the European Communities, it has been an important neighbour, and was a leading member state until its withdrawal from the EU on 31 January 2020 as a result of Brexit, ending 47 years of membership.
However, occasionally member states negotiate certain opt-outs from legislation or treaties of the European Union, meaning they do not have to participate in certain policy areas.
[3] The UK formally requested to participate in certain provisions of the Schengen acquis – Title III relating to Police Security and Judicial Cooperation – in 1999, and this was approved by the Council of the European Union on 29 May 2000.
The Labour government of Tony Blair argued that the UK should join the euro, contingent on approval in a referendum, if five economic tests were met.
Although not a full opt-out, both the United Kingdom and Poland secured a protocol which clarified how the Charter of Fundamental Rights of the European Union, a part of the Treaty of Lisbon, would interact with national law in their countries limiting the extent that European courts would be able to rule on issues related to the Charter if they are brought to courts in Poland or the UK.
[26][27] Following the announcement by the government of the United Kingdom that it would hold a referendum on withdrawing from the European Union, an agreement was reached between it and the EU on renegotiated membership terms should the state vote to remain a member.
In addition to a number of amendments to EU Regulations which would apply to all states, a legal guarantee would be granted to the UK that would explicitly exempt it from the treaty-stated symbolic goal of creating an "ever closer union" by deepening integration.