The city has a complex history, having had periods of Polish, German and self rule. An important shipbuilding and trade port since the Middle Ages, in 1361 it became a member of the Hanseatic League which influenced its economic, demographic and urban landscape. It also served as Poland's principal seaport, and was the largest city of Poland in the 15th-17th centuries. In 1793, within the Partitions of Poland, the city became part of Prussia, and thus a part of the German Empire from 1871 after the unification of Germany. Following World War I and the Treaty of Versailles, it was a Free City under the protection of the League of Nations from 1920 to 1939. On 1 September 1939 it was the scene of the first clash of World War II at Westerplatte. The contemporary city was shaped by extensive border changes, expulsions and new settlement after 1945. In the 1980s, Gdańsk was the birthplace of the Solidarity movement, which helped precipitate the collapse of the Eastern Bloc, the fall of the Berlin Wall and the dissolution of the Warsaw Pact.
The city has a complex history, having had periods of Polish, German and self rule. An important shipbuilding and trade port since the Middle Ages, in 1361 it became a member of the Hanseatic League which influenced its economic, demographic and urban landscape. It also served as Poland's principal seaport, and was the largest city of Poland in the 15th-17th centuries. In 1793, within the Partitions of Poland, the city became part of Prussia, and thus a part of the German Empire from 1871 after the unification of Germany. Following World War I and the Treaty of Versailles, it was a Free City under the protection of the League of Nations from 1920 to 1939. On 1 September 1939 it was the scene of the first clash of World War II at Westerplatte. The contemporary city was shaped by extensive border changes, expulsions and new settlement after 1945. In the 1980s, Gdańsk was the birthplace of the Solidarity movement, which helped precipitate the collapse of the Eastern Bloc, the fall of the Berlin Wall and the dissolution of the Warsaw Pact.