United Kingdom opt-outs from EU legislation

The United Kingdom was a member state of the European Union and of its predecessor the European Communities from 1973 until 2020. 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.

In general, the law of the European Union is valid in all of the European Union member states. 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. The United Kingdom had four opt-outs in place before leaving the Union–the most of any EU member state, making it the least integrated member state.

Schengen Agreement
The Schengen Agreement abolished border controls between member states. The United Kingdom and Ireland received opt-outs from implementing the Schengen acquis when the Treaty of Amsterdam of 1997 incorporated it into the EU treaties, as they were the only EU member states which had not signed the agreement. However, the protocol on the Schengen acquis specified that they could request to opt into participating in Schengen measures on a case-by-case basis if they wished, subject to unanimous approval of the other participating states. The opt-out has been criticised in the United Kingdom for hampering the United Kingdom's capabilities in stopping transnational crime through the inability to access the Schengen Information System. Although the United Kingdom was not part of the Schengen passport-free area, it still used the Schengen Information System, a governmental database used by European countries to store and disseminate information on individuals and property. This allowed the UK to exchange information with countries that are a part of the Schengen agreement, often for the sake of liaising over law enforcement.

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 United Kingdom's formal participation in the previously approved areas of cooperation was put into effect by a 2004 Council decision that came into effect on 1 January 2005.

Economic and Monetary Union
All member states, other than Denmark and previously the United Kingdom, have either adopted the euro or are legally bound to do so. The Maastricht Treaty of 1992 included protocols on the UK and Denmark giving them opt-outs with the right to decide if and when they would join the euro.

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. However, the assessment of those tests in June 2003 concluded that not all were met. The policy of the 2010s coalition government, elected in 2010, was against introducing the euro prior to the 2015 general election.

Charter of Fundamental Rights of the European Union
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.

The UK was worried that the Charter might be used to alter British labour law, especially as relates to allowing more strikes. The European Scrutiny Committee of the British House of Commons, including members of both the Labour Party and the Conservative Party, has however cast doubts on the provision's text, asserting that the clarification might not be worded strongly and clearly enough to achieve the government's aims.

After the Civic Platform won the 2007 parliamentary election in Poland, it announced that it would not opt-out from the Charter, leaving the UK as the only state not to adopt it.

Area of freedom, security and justice
The United Kingdom had a flexible opt-out from legislation adopted in the area of freedom, security and justice, which includes all matters previously part of the pre-Amsterdam Justice and Home Affairs (JHA) pillar. This allows them to opt-in or out of legislation and legislative initiatives on a case-by-case basis, which they usually do, except on matters related to Schengen. The opt-out from the JHA policy area was originally obtained by both states in a protocol to the Treaty of Amsterdam of 1997, and was retained with the Treaty of Lisbon.

Under Protocol 36 of the Lisbon Treaty, the UK had the option to opt out of all the police and criminal justice legislation adopted prior to the treaty's entry into force which had not been subsequently amended. The decision to opt out had to be made at least six months prior to the aforementioned measures coming under the jurisdiction of the European Court of Justice on 1 December 2014.

The UK informed the European Council of their decision to exercise their opt-out in July 2013, and as such the impacted legislation ceased to apply to the UK as of 1 December 2014. While the protocol only permitted the UK to either opt-out from all the legislation or none of it, they subsequently opted back into some measures.

Social Chapter
The Major ministry secured the United Kingdom an opt-out from the protocol on the Social Chapter of the Maastricht Treaty, which related to social issues and particularly rights in the workplace, before it was signed in 1992. The Blair ministry abolished this opt-out after coming to power in the 1997 general election as part of the text of the Treaty of Amsterdam.

Pre-Brexit referendum renegotiation
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. This guarantee was included in a Decision by the European Council, with the promise that it would be incorporated into the treaties during their next revision. However, following the referendum, in which the UK voted to leave the EU, the agreement was abandoned.