Gdańsk (Kashubian: Gduńsk; German: Danzig) is a city on the Baltic coast of northern Poland, and the capital of the Pomeranian Voivodeship. With a population of 486,492, it is Poland's sixth-largest city and its major seaport. Gdańsk lies at the mouth of the Motława River and is situated at the southern edge of Gdańsk Bay, close to the city of Gdynia and the resort town of Sopot; these form a metropolitan area called the Tricity (Trójmiasto), with a population of approximately 1.5 million.
Gdańsk was first mentioned in 997 as part of the early Polish state, and thereafter grew into a trading town under the Piast and Samboride dynasties. Shifting between Polish and Teutonic control during the Middle Ages, it subsequently joined the Hanseatic League and, with considerable autonomy, served as Poland's principal seaport and largest city until the early 18th century. With the Partitions of Poland, the city was annexed by Prussia in 1793, and was integrated into the German Empire in 1871. It was a free city from 1807 to 1814 and from 1920 to 1939. On 1 September 1939, it was the site of a military clash at Westerplatte, one of the first events of World War II. The contemporary city was shaped by extensive border changes, expulsions and resettlement after 1945. In the 1980s, Gdańsk was the birthplace of the Solidarity trade union and movement, which helped precipitate the collapse of communism in Europe.