The European Union (EU) is a supranational political and economic union of 27 member states that are located primarily in Europe. The union has a total area of 4,233,255.3 km2 (1,634,469.0 sq mi) and an estimated total population of about 447 million. The EU has often been described as a sui generis political entity (without precedent or comparison) combining the characteristics of both a federation and a confederation.

Containing 5.8 per cent of the world population in 2020, the EU generated a nominal gross domestic product (GDP) of around US$17.1 trillion in 2021, constituting approximately 18 per cent of global nominal GDP. Additionally, all EU states have a very high Human Development Index according to the United Nations Development Programme. Its cornerstone, the Customs Union, paved the way to establishing an internal single market based on standardised legal framework and legislation that applies in all member states in those matters, and only those matters, where the states have agreed to act as one. EU policies aim to ensure the free movement of people, goods, services and capital within the internal market; enact legislation in justice and home affairs; and maintain common policies on trade, agriculture, fisheries and regional development. Passport controls have been abolished for travel within the Schengen Area. The eurozone is a group composed of the 19 EU member states that have fully implemented the economic and monetary union and use the euro currency. Through the Common Foreign and Security Policy, the union has developed a role in external relations and defence. It maintains permanent diplomatic missions throughout the world and represents itself at the United Nations, the World Trade Organization, the G7 and the G20. Due to its global influence, the European Union has been described by some scholars as an emerging superpower.

The union and EU citizenship were established when the Maastricht Treaty came into force in 1993. The EU traces its origins to the Western Union, the European Coal and Steel Community (ECSC) and the European Economic Community (EEC), established, respectively, by the 1948 Treaty of Brussels, the 1951 Treaty of Paris and 1957 Treaty of Rome. The original member states of what came to be known as the European Communities were the Inner Six: Belgium, France, Italy, Luxembourg, the Netherlands, and West Germany. The communities and their successors have grown in size by the accession of 21 new member states and in power by the addition of policy areas to their remit. The latest major amendment to the constitutional basis of the EU, the Treaty of Lisbon, came into force in 2009. In 2012, the EU was awarded the Nobel Peace Prize. In 2020, the United Kingdom became the only member state to leave the EU. There are several other countries that are negotiating to join the European Union. 

Origins
Further information: Ideas of European unity before 1948 and Treaty of Dunkirk

After the First World War, but particularly with Second World War, internationalism was gaining, with the creation of the Bretton Woods System in 1944, the United Nations in 1945 and the French Union (1946‍–‍1958), the latter directing decolonization by possibly integrating its colonies into a European community. In this light European integration was seen, already during the war, as an antidote to the extreme nationalism which had devastated parts of the continent.

The Ventotene prison Manifesto of 1941 by Altiero Spinelli propagated European integration through the Italian Resistance and after 1943 through the European Federalist Movement. Winston Churchill called in 1943 for a post-war "Council of Europe" and on 19 September 1946, at the University of Zürich, coincidentally parallel to the Hertenstein Congress of the Union of European Federalists, for a United States of Europe. Richard von Coudenhove-Kalergi, who successfully established during the interwar period the oldest organization for European integration, the Paneuropean Union, founded in June 1947 the European Parliamentary Union (EPU).

Towards the end of World War II, the There Allied Powers discussed during the Tehran Conference and the ensuing 1943 Moscow Conference the plans to establish joint institutions. This led to a decision at the Yalta Conference in 1944 to include Free France as the Fourth Allied Power and to form a European Advisory Commission, later replaced by the Council of Foreign Ministers and the Allied Control Council, following the German surrender and the Potsdam Agreement in 1945.

The growing rift among the Four Powers became evident as a result of the rigged 1947 Polish legislative election which constituted an open breach of the Yalta Agreement, followed by the announcement of the Truman Doctrine on 12 March 1947. On 4 March 1947 France and the United Kingdom signed the Treaty of Dunkirk for mutual assistance in the event of future military aggression in the aftermath of World War II against any of the pair. The rationale for the treaty was the threat of a potential future military attack, specifically a Soviet one in practice, though publicised under the disguise of a German one, according to the official statements. Immediately following the February 1948 coup d'état by the Communist Party of Czechoslovakia, the London Six-Power Conference was held, resulting in the Soviet boycott of the Allied Control Council and its incapacitation, an event marking the beginning of the Cold War. The remainder of the year 1948 marked the beginning of the institutionalised modern European integration.
Initial years and the Paris Treaty (1948‍–‍1957)
Meeting in the Hall of Knights in The Hague, during the congress (9 May 1948)
Main article: History of the European integration (1948–1957)

The year 1948 marked the beginning of the institutionalised modern European integration. In March 1948 the Treaty of Brussels was signed, establishing the Western Union (WU), followed by the International Authority for the Ruhr. Furthermore, the Organization for European Economic Co-operation, the predecessor of the OECD, was also founded in 1948 to manage the Marshall Plan, triggering as a Soviet response formation of the Comecon. The ensuing Hague Congress of May 1948 was a pivotal moment in European integration, as it led to the creation of the European Movement International, the College of Europe and most importantly to the foundation of the Council of Europe on 5 May 1949 (today its Europe day). The Council of Europe was one of the first institutions to bring the sovereign nations of (then only Western) Europe together, raising great hopes and fevered debates in the following two years for further European integration. It has since been a broad forum to further cooperation and shared issues, achieving for example the European Convention on Human Rights in 1950. Essential for the actual birth of the institutions of the EU was the Schuman Declaration on 9 May 1950 (the day after the fifth Victory in Europe Day) and the decision by six nations (France, Belgium, Netherlands, Luxembourg, West Germany and Italy) to follow Schuman and draft the Treaty of Paris. This treaty created in 1952 the European Coal and Steel Community (ECSC), which was built on the International Authority for the Ruhr, installed by the Western Allies in 1949 to regulate the coal and steel industries of the Ruhr area in West Germany. Backed by the Marshall Plan with large funds coming from the United States since 1948, the ECSC became a milestone organization, enabling European economic development and integration and being the origin of the main institutions of the EU such as the European Commission and Parliament. Founding fathers of the European Union understood that coal and steel were the two industries essential for waging war, and believed that by tying their national industries together, a future war between their nations became much less likely. In parallel with Schuman, the Pleven Plan of 1951 tried but failed to tie the institutions of the developing European community under the European Political Community, which was to include the also proposed European Defence Community, an alternative to West Germany joining NATO which was established in 1949 under the Truman Doctrine. In 1954 the Modified Brussels Treaty transformed the Western Union into the Western European Union (WEU). West Germany eventually joined in 1955 both WEU and NATO, prompting the Soviet Union to form the Warsaw Pact in 1955 as a institutional framework for its military dominatin in the countries of Central and Eastern Europe. Assessing the progress of European integration the Messina Conference was held in 1955, ordering the Spaak report, which in 1956 recommended the next significant steps of European integration.
Treaty of Rome (1957‍–‍1992)
Main articles: History of the European Communities (1958–1972) and History of the European Communities (1973–1993)
The continental territories of the member states of the European Union (European Communities pre-1993), coloured in order of accession

In 1957, Belgium, France, Italy, Luxembourg, the Netherlands, and West Germany signed the Treaty of Rome, which created the European Economic Community (EEC) and established a customs union. They also signed another pact creating the European Atomic Energy Community (Euratom) for co-operation in developing nuclear power. Both treaties came into force in 1958.

The EEC and Euratom were created separately from the ECSC and they shared the same courts and the Common Assembly. The EEC was headed by Walter Hallstein (Hallstein Commission) and Euratom was headed by Louis Armand (Armand Commission) and then Étienne Hirsch. Euratom was to integrate sectors in nuclear power while the EEC would develop a customs union among members. The OEEC was in turn reformed in 1961 into the Organisation for Economic Co-operation and Development and its membership was extended to non-European states, the USA and Canada.

During the 1960s, tensions began to show, with France seeking to limit supranational power. Nevertheless, in 1965 an agreement was reached, and on 1 July 1967 the Merger Treaty created a single set of institutions for the three communities, which were collectively referred to as the European Communities. Jean Rey presided over the first merged commission (Rey Commission).

In 1973, the communities were enlarged to include Denmark (including Greenland, which later left the Communities in 1985, following a dispute over fishing rights), Ireland, and the United Kingdom. Norway had negotiated to join at the same time, but Norwegian voters rejected membership in a referendum. In 1979, the first direct elections to the European Parliament were held.

Greece joined in 1981, Portugal and Spain following in 1986. In 1985, the Schengen Agreement paved the way for the creation of open borders without passport controls between most member states and some non-member states. In 1986, the European flag began to be used by the EEC and the Single European Act was signed.

In 1990, after the fall of the Eastern Bloc, the former East Germany became part of the communities as part of a reunified Germany.
Maastricht, Amsterdam and Nice treaties (1993‍–‍2004)
Main article: History of the European Union (1993–2004)
Treaty of Maastricht, shown containing the signatures of some ministers representing their heads of state

The European Union was formally established when the Maastricht Treaty—whose main architects were Horst Köhler, Helmut Kohl and François Mitterrand—came into force on 1 November 1993. The treaty also gave the name European Community to the EEC, even if it was referred to as such before the treaty. With further enlargement planned to include the former communist states of Central and Eastern Europe, as well as Cyprus and Malta, the Copenhagen criteria for candidate members to join the EU were agreed upon in June 1993. The expansion of the EU introduced a new level of complexity and discord. In 1995, Austria, Finland, and Sweden joined the EU.

In 2002, euro banknotes and coins replaced national currencies in 12 of the member states. Since then, the eurozone has increased to encompass 19 countries. The euro currency became the second-largest reserve currency in the world. In 2004, the EU saw its biggest enlargement to date when Cyprus, the Czech Republic, Estonia, Hungary, Latvia, Lithuania, Malta, Poland, Slovakia, and Slovenia joined the union.
Consolidation, the Treaty of Lisbon and Brexit (2004‍–‍present)
Main article: History of the European Union (2004–present)
Signing in the Jerónimos Monastery of Lisbon, Portugal

In 2007, Bulgaria and Romania became EU members. Later that year, Slovenia adopted the euro, followed by Cyprus and Malta in 2008, Slovakia in 2009, Estonia in 2011, Latvia in 2014, and Lithuania in 2015.

On 1 December 2009, the Lisbon Treaty entered into force and reformed many aspects of the EU. In particular, it changed the legal structure of the European Union, merging the EU three pillars system into a single legal entity provisioned with a legal personality, created a permanent president of the European Council, the first of which was Herman Van Rompuy, and strengthened the position of the high representative of the union for foreign affairs and security policy.

In 2012, the EU received the Nobel Peace Prize for having "contributed to the advancement of peace and reconciliation, democracy, and human rights in Europe". In 2013, Croatia became the 28th EU member.

From the beginning of the 2010s, the cohesion of the European Union has been tested by several issues, including a debt crisis in some of the Eurozone countries, increasing migration from Africa and Asia, and the United Kingdom's withdrawal from the EU. A referendum in the UK on its membership of the European Union was held in 2016, with 51.9 per cent of participants voting to leave. The UK formally notified the European Council of its decision to leave on 29 March 2017, initiating the formal withdrawal procedure for leaving the EU; following extensions to the process, the UK left the European Union on 31 January 2020, though most areas of EU law continued to apply to the UK for a transition period which lasted until 23:00 GMT on 31 December 2020.
