The Free City of Danzig (German: Freie Stadt Danzig; Polish: Wolne Miasto Gdańsk) was a semi-autonomous city-state that existed between 1920 and 1939, consisting of the Baltic Sea port of Danzig (now Gdańsk, Poland) and nearly 200 towns and villages in the surrounding areas. It was created on 15 November 1920 in accordance with the terms of Article 100 (Section XI of Part III) of the 1919 Treaty of Versailles after the end of World War I.
The Free City included the city of Danzig and other nearby towns, villages, and settlements that had been primarily inhabited by Germans. As the Treaty stated, the region was to remain separated from post-World War I Germany (the Weimar Republic) and from the newly independent nation of the Second Polish Republic ("interwar Poland"), but it was not an independent state. The Free City was under League of Nations protection and put into a binding customs union with Poland.
Poland was given full rights to develop and maintain transportation, communication, and port facilities in the city. The Free City was created in order to give Poland access to a well-sized seaport. While the city's population was majority-German, it had a significant ethnic Polish minority as well. The German population deeply resented being separated from Germany. The tensions increased when the Nazi Party gained political control in 1935–36.
Since Poland still was not in complete control of the seaport, especially regarding military equipment, a new seaport was built in nearby Gdynia, beginning 1921.
In 1933, the city's government was taken over by the local Nazi Party, which suppressed the democratic opposition. Due to anti-Semitic persecution and oppression, many Jews fled. After the German invasion of Poland in 1939, the Nazis abolished the Free City and incorporated the area into the newly formed Reichsgau of Danzig-West Prussia. The Nazis classified the Poles and Jews living in the city as subhumans, subjecting them to discrimination, forced labor, and extermination. Many were sent to death at Nazi concentration camps, including nearby Stutthof (now Sztutowo, Poland).
During the city's conquest by the Soviet Army in the early months of 1945, a substantial number of citizens fled or were killed. After the war, many surviving Germans were expelled to West or East Germany as members of the pre-war Polish ethnic minority started returning and as new Polish settlers began to come. Due to these events, Gdańsk suffered severe underpopulation and did not recover until the late 1950s. The city subsequently became part of Poland as a consequence of the Potsdam Agreement.