History of Gdańsk



Gdańsk (Danzig; Gduńsk) is one of the oldest cities in Poland. Founded by the Polish ruler Mieszko I in the 10th century, the city was for a long time part of Piast state either directly or as a fief. In 1308 the city became part of the Monastic State of the Teutonic Knights until 1454. Thereafter it became part of Poland again, although with increasing autonomy. A vital naval city for Polish grain trade, it attracted people from all over the European continent. The city was taken over by Prussia during the Second Partition of Poland in 1793 and subsequently lost its importance as a trading port. Briefly becoming a free city during Napoleonic Wars, it was again Prussian after Napoleon's defeat, and later became part of the newly created German Empire.

After World War I the Free City of Danzig was created, a city-state under the supervision of the League of Nations. The German attack on the Polish military depot at Westerplatte marks the start of World War II and the city was annexed by Nazi Germany in 1939. Local Jews were systematically murdered in the Holocaust while Poles and Kashubians also faced persecution. After World War II the city became again part of Poland and the city's German inhabitants, that had constituted the majority of the city's mixed population before the war, either fled or were expelled to Germany in accordance with the Potsdam Agreement. During post-1945 era, the city was rebuilt from war damage, and vast shipyards were constructed. The centre of Solidarity strikes in the 1980s, after abolishment of communism in 1989 its population faced poverty and large unemployment with most of the ship building industry closed down.

Early times
The area around the Vistula delta was inhabited by populations belonging to the various archaeological cultures of the Stone Age, Bronze Age, and Iron Age. Settlements existed in the area for several centuries BC.

Foundation in early Polish state
Most likely Mieszko I of Poland founded the town in the 980s, thereby connecting the Polish state ruled by the Piast dynasty with the trade routes of the Baltic Sea. The earliest traces of medieval settlement were discovered in an area now occupied by the town hall of the Main Town, on top of archaeological remains from the Roman Iron Age. The oldest constructions of this settlement were built, according to dendrochronology, with timber from trees cut in 930. The immediate western vicinity of the town hall has, however, so far not been surveyed, thus it can not be excluded that the settlement extended further to the west. Dendrodates exclusively refer to the 10th century, no constructions from the 11th century were found. The very beginning of Gdańsk is related to the fall of Truso in the second half of the 10th century - the Viking Age Emporium situated on eastern side of the Vistula delta. Only after this town declined, it was eclipsed as a trade centre by nearby Gdańsk.

In the area south of the current St. Nicholas church, settlement started some years later. The oldest constructions there were dated by finds of pottery to either the second half of the 10th century or the turn of the 10th to the 11th century. The first written record thought to refer to Gdańsk is the vita of Saint Adalbert: Written in 999, it describes how in 997 Saint Adalbert of Prague baptized the inhabitants of urbs Gyddannyzc, "which separated the great realm of the duke from the sea." No further written sources exist for the 10th and 11th centuries.

In the area of the current Great Mill the oldest settlement layers were dated by finds of pottery to the 11th century or the turn of the 12th. Though the area between St. Nicholas Church and the Great Mill has not yet been sufficiently surveyed, it has been suggested by Paner that in the course of the 11th century the settlement just south of St. Nicholas was expanded to the northwest to reach the vicinity of the Great Mill and, possibly, the area around St. Catherine church. In the northern vicinity of St. Nicholas, in the area of the current market hall, settlement then started probably in the 12th century. , archaeologists have not been able to find traces of fortifications around the before mentioned settlement(s).

Slightly east of the Great Mill, at the banks of the Motława river, a stronghold was built in the 1060s. This stronghold encompassed roughly the area now enclosed by the Rycerska and Sukiennicza streets, and in the 11th century was located at the confluence of the Motława and Vistula rivers. The stronghold consisted of a fort and a suburbium covering 2.7 ha which may have held 2,200 to 2,500 inhabitants. Timber from trees cut between 1054 and 1063 was used for buildings of the first phase of the stronghold's construction, timber from trees cut around 1090 was used to construct the buildings of the subsequent phase. A first rampart enclosing the stronghold was built with timber from trees cut in the 1060s. Starting in 1112, according to dendrodates, the stronghold was first leveled and subsequently transformed. This corresponds with written sources mentioning the subduction of Pomerelia by Piast Polish king Boleslaw III Wrymouth between 1112 and 1116. The youngest examined layers from which dendrodates could be derived point at around 1135.

Starting in the mid-12th and throughout the 13th centuries, the settlement west of the stronghold greatly expanded northwards to comprise the wider area around present-day Rajska and Podbielanska streets in the Old Town. In the southern part of the settlement, in the area now occupied by the market hall, a Romanesque St. Nicholas church was built in the second half of the 12th century, which according to Paner "was probably the second masonry church in Gdansk, after the stronghold's church" and was replaced by another Romanesque St. Nicholas church built in 1223-1241 by the Dominicans, who owned the area since 1227. In 1168, the Cistercians built a monastery in nearby Oliwa (northwest of the town) which is inside the modern city limits. A parochial St. Catherine church is first mentioned in written records in the second half of the 13th century, situated in the new centre of the expanded settlement.

Capital of a Pomerelian Duchy (1215–1271)
At the end of the 11th century Poland lost control over Pomerelia and did not regain it until the 12th century. Soon after Poland itself was divided into several autonomous provinces formally under the overlordship of the High-Duke of Kraków. The Pomerelian duchies remained under the control of stewards, of the Samborides dynasty, appointed by Polish Dukes, usually those of Greater Poland, although like other Polish provinces during the period of the fragmentation of Poland it increased its regional autonomy. Gdańsk was the main stronghold of Samborides, serving as residence of Mestwin I (1207–1220), Swietopelk II (1215–1266) and Mestwin II (1271–1294).

In 1226, the monastery in Oliwa was raided by pagan Old Prussians.

Around 1235 the settlement had some 2,000 inhabitants and was granted Lübeck city rights by Swietopelk II. Merchants from the Hanseatic cities of Lübeck and Bremen began to settle in the town after 1257, although a significant German population was not present until the 14th century. Officially chartered as a city in 1224, it rose to become one of the more important trading and fishing ports along the Baltic Sea coast. However, in 1282/1294 Mestwin II, the last duke of Pomerelia, ceded all his lands including Gdańsk to Przemysł II, Duke of Greater Poland, who soon became King of Poland, thus it was reunited with the Kingdom of Poland.

Monastic State of the Teutonic Knights (1308–1454)


At the beginning of the 14th century, the region was plunged into war involving Poland and the Margraviate of Brandenburg. Because King Władysław I of Poland's troops were unable to relieve Gdańsk from a siege by Brandenburg, the city's Pomeranian judge, Bogusza, appealed to the Teutonic Knights for assistance. The Knights expelled the Brandenburgers in 1308, but did not relinquish the city to Poland. The townspeople rebelled in an uprising bloodily repressed by the Knights. The royal garrison was attacked and expelled and the suburban populace was slaughtered, with the suburbs subsequently destroyed. Gdańsk's colony of German merchants and artisans was specifically attacked because they competed with the Knights' town of Elbing (Elbląg), a nearby city. Polish reports claimed that 10,000 inhabitants were slain in the city. Although that number has been subject of debate among historians, a consensus has been established that many people were murdered and a considerable part of the town was destroyed in the context of the take-over.

The Knights then captured the rest of Pomerelia from Brandenburg's troops. In September 1309, Margrave Waldemar of Brandenburg-Stendal sold his claim to the territory to the Teutonic Order for 10,000 marks, thereby connecting the Order's territory with that of the Holy Roman Empire. Gdańsk, under the Germanized name Danzig, was incorporated into the Monastic State of the Teutonic Knights. Previously allies against the Baltic tribe of the Old Prussians, Poland and the Teutonic Order engaged in a series of Polish-Teutonic Wars after the Knights' capture of Pomerelia.

Between 1361 and 1416 the city's burghers rose in several armed revolts against the rule of the Teutonic Knights. In 1410, during the Polish–Lithuanian–Teutonic War the city's council recognized the Polish king, Władysław Jagiełło as its sovereign. After the end of the war, concluded with the Peace of Toruń in 1411, Jagiełło relieved the city of its oath of fealty and it reverted to Teutonic rule. Subsequently, the city's populace was repressed by the German knights as punishment for its support of the Polish king.

In 1380, the first Scots settled in the city, founding what would eventually become a significant Scottish diaspora in Poland.

Development of the city initially stagnated after its capture by the Teutonic Knights. The new rulers tried to reduce the economic significance of Danzig by abolishing the local government and the privileges of the town's traders. This was exemplified by the fact that the Danzig city council, including Arnold Hecht and Conrad Letzkau, was removed and its leaders beheaded in 1411. Later on, the German knights had to accept the fact that Danzig defended its independence and was the largest and most important seaport of the region after overtaking Elbing. Subsequently, Danzig flourished, benefiting from major investment and economic prosperity in the Teutonic Prussia and Poland, which stimulated trade along the Vistula. The city had become a full member of the Hanseatic League by 1361, but its merchants remained resentful at the barriers to the trade up the Vistula river to Poland, along with the lack of political rights in a state ruled in the interest of the Order's religiously motivated knight-monks.

The takeover of Gdańsk by the Teutonic Order was questioned consistently by the Polish kings Władysław and Casimir III the Great, which led to a series of bloody wars and legal suits in the papal court in 1320 and 1333. Peace was established in the Treaty of Kalisz in 1343; although the Polish kings were able to retain the title "Duke of Pomerania" and were recognized as titular overlords of the crusaders, the Knights retained control of Danzig for the time being.

As part of the Kingdom of Poland (1454–1793)
In 1440, the city participated in the foundation of the Prussian Confederation which was an organisation opposed to the rule of the Teutonic Knights. The organisation in its complaint of 1453 mentioned repeated cases in which the Teutonic Knights imprisoned or murdered local patricians and mayors without a court verdict. On the request of the organisation King Casimir IV Jagiellon reincorporated the territory to the Kingdom of Poland in 1454. Since 1454, the city was authorized by the King to mint Polish coins. The local mayor pledged allegiance to the King during the incorporation on March 6, 1454, in Kraków, and the city again solemnly pledged allegiance to the King in June 1454 in Elbląg, recognizing the prior Teutonic annexation and rule as unlawful. In 1457, King Casimir IV vested the city was new privileges. During the resulting Thirteen Years' War (1454–1466), the fleet of Danzig fought on the side of Poland in several battles, scoring important victories in the Battle of Bornholm (1457) and the Battle of Vistula Lagoon (1463). The war ended in 1466 with the Order's defeat. With the Second Peace of Thorn (1466), the Teutonic Knights renounced claims to the city and recognized it as part of Poland, within which it was administratively located in the Pomeranian Voivodeship in the province of Royal Prussia (later also part of the Greater Poland Province).

The 15th and 16th centuries brought changes to the city's cultural heritage. They could be seen in the arts and language, as well as Danzig's contributions to the world of science. In 1471, a refurbished sailing ship under the native Danzig captain Paul Beneke brought the famous altar painting titled The Last Judgment by artist Hans Memling to the city. Around 1480–1490, tablets were installed at St. Mary's Church, depicting the Ten Commandments in Middle Low German.

The city was visited by Nicolaus Copernicus in 1504 and 1526, and Narratio Prima, the first printed publication of his heliocentric theory, was published there in 1540.

In 1520 Lutheran scriptures were printed, in 1522 the first Lutheran liturgy was held by the local cleric Jakob Hegge and the Protestant Reformation was soon supported by the local populace. In 1523 some iconoclastic riots occurred and the towncouncil was deposed. This revolt was quelled in 1524 by Polish troops and the leaders were executed or imprisoned, some of them released and exiled to the Protestant Duchy of Prussia, a vassal duchy of Poland, on request of Albert of Prussia. While the city ordinance of 1526 penalized the Lutheran liturgy under death penalty, the burghers were still influenced by reformatory ideas. In 1557 the Lutheran Eucharist was permitted and both religious orientations were tolerated.

Georg Joachim Rheticus visited the mayor of Danzig in 1539, while he was working with Nicolaus Copernicus in nearby Frombork. The mayor of Danzig gave Rheticus financial assistance for the publication of the Narratio Prima, published by the Danzig printer Franz Rhode in 1540 and to this day considered the best introduction to the Copernican theory. While in Danzig, Rheticus, who was also a cartographer and navigational instrument maker, interviewed Danzig sailors as to their navigational needs. He presented the Tabula chorographica auff Preusse to Duke Albert of Prussia in 1541.



From 1563, for over a century, the post of town master builder was held by architects from the Netherlands. Entire streets were designed in Dutch Renaissance style.

In 1566, the official language of the city's governing institutions was changed from Middle Low German, which had been used throughout the Hanseatic cities, to standard German, used in most German courts. The Polish language was taught in local Academic Gymnasium (Grammar School or High School) from 1589.

In the 16th century, Danzig was the largest and one of the most influential cities of Poland and had a preponderantly German-speaking population. The city enjoyed voting rights during the free election period. The city flourished and several of its landmarks were erected in the 16th and 17th centuries, including the Highland Gate, Golden Gate, Neptune's Fountain, Royal Chapel, Great Armoury and Green Gate, an official residence of Polish Kings. The St. Mary's Church and Main Town Hall were completed, with the latter topped with a gilded statue of Polish King Sigismund II Augustus.

During the Danzig rebellion the city was besieged for six months in 1577 by the forces of King Stephen Báthory. With the Royal army unable to capture the city and the Danzig forces failing to lift the siege a settlement was negotiated in which Báthory confirmed the city's special status and her Danzig law privileges and the city recognised him as ruler of the Commonwealth and paid him a large sum of 200,000 złotys.

In 1606 a distillery named Der Lachs (German for "the Salmon") was founded, which produced one of Danzig's most famous products, a liqueur named Danziger Goldwasser.

The Danzig printer Andreas Hünefeld (Hunsfeldus) (1606–1652) printed a Danzig edition of the Rosicrucian Manifestos. Later on, he published the poems of Martin Opitz. Opitz had died in 1639 and his friend, Pastor Bartholomaeus Nigrinus of Danzig, together with two associates edited the Opitz poems for the Hünefeld printing house. Polish private schools were opened in addition to public schools who taught Polish during this period with 1370 Polish students in later half of the 17th century.

Around 1640, Johannes Hevelius established his astronomical observatory in the Old Town. Polish King John III Sobieski regularly visited Hevelius numerous times. From the 14th century until the mid-17th century, Danzig experienced rapid growth, becoming by the 16th century the largest city on the Baltic seaboard, owing to its large trade with the Netherlands and its handling of most of Poland's seaborne trade, transported northward via the Vistula River. The city's prosperity was severely restricted, however, by the Polish–Swedish wars of 1626–1629 and the 1655–1660, and it suffered an epidemic of bubonic plague in 1709. In 1627, the naval Battle of Oliwa was fought near the city, regarded as one of the greatest victories in the history of the Polish Navy. In 1655, Charles X Gustav of Sweden invaded Poland and appeared outside the Danzig city walls, but refrained from laying siege. A Dutch fleet arrived in July 1656, reopening the vital trade with the Netherlands. The war of 1655–1660 ended with the Treaty of Oliwa, signed in the present-day district of Oliwa.

In 1650 87 percent of the populace were Lutheran, 6 percent Calvinists and about 7 percent Catholics, a number that would grow to more than 20 percent in 1800 due to the migration of Catholics from the vicinity. A large share of the Lutheran population used Polish as their language and Poles played an influential role in the Lutheran Church in Royal Prussia.

Danzig took part in all Hanseatic League conferences until the final one in 1669. By that time the United Provinces and other long-distance overseas commercial powers had surpassed the Baltic trade centres such as Danzig. In 1677, a Polish-Swedish alliance against Brandenburg was signed in the city.

After the outbreak of the Rákóczi's War of Independence against Austria, in 1703, Polish King Augustus II the Strong in an official document to the city prohibited the purchase of weapons for the Hungarian insurgents, but at the same time he secretly assured Francis II Rákóczi of his friendship, and many weapons were supplied to the Hungarians through the city during the war. After the fall of the uprising in 1711, Rákóczi and his court, including essayist Kelemen Mikes and painter Ádám Mányoki, found refuge in the city. Rákóczi often met with Polish dignitaries and the envoy of France in the city. In 1712, Rákóczi left the city for France, however, some Hungarians, like court marshall Ádám Vay stayed.

In 1734, the city was briefly occupied by the Russians under Field Marshal Munnich after the prolonged Siege of Danzig during the War of the Polish Succession. The city, which supported Stanisław Leszczyński, the losing candidate for the throne, was forced to pay reparations following the siege.

The future Polish king Stanisław August Poniatowski lived in Danzig until the age of 7, and his brother Michał Jerzy Poniatowski, who would become the Primate of Poland, was born in the city.

In 1743 the Danzig Research Society was formed by Daniel Gralath and Gottfried Lengnich.

In the Kingdom of Prussia (1793–1806)
After the First Partition of Poland in 1772, the inhabitants of Danzig fought fiercely for it to remain a part of Poland, although the surrounding Pomeranian Voivodeship fell to the Kingdom of Prussia. The city remained a Polish exclave until it was eventually captured by Prussian forces during the Second Partition of Poland in 1793 and incorporated into the Kingdom of Prussia as part of the province of West Prussia. According to Peter Oliver Loew (2011) the common language in Danzig until the partition was German and the knowledge of German was the premise to become an integrated burgher. Both the Polish and the German-speaking inhabitants opposed the Prussian annexation and wished the city to remain part of Poland. Many demonstrated their resentment towards Prussia, with some, like Arthur Schopenhauer's family, choosing emigration. The mayor of the city stepped down from his office due to the annexation, and also notable city councilor Jan Uphagen, historian and art collector, whose Baroque house is now a museum, resigned as a sign of protest against the annexation. An attempt of student uprising against Prussia led by Gottfried Benjamin Bartholdi was crushed quickly by the authorities in 1797. The migration processes that happened after Prussia took over the city diminished the usage of Polish language and structure of population.

Napoleonic Free City (1807–1814)
After the defeat of the Fourth Coalition, and the capture of the city by French, Polish and Italian troops, Napoleon Bonaparte created the semi-independent Free City of Danzig (1807–1814). Danzig reverted to Prussia after Napoleon's defeat in 1814, following another siege that lasted almost a whole year. The city became the capital of Regierungsbezirk Danzig within West Prussia in 1815.

In the Kingdom of Prussia (1815–1919)
In 1816 about 70 percent of the populace were Lutheran, 23.6 percent Catholics; the share of Catholics would grow to 33 percent in 1910.

Since the 1820s, the Wisłoujście Fortress served as a prison, mainly for Polish political prisoners, including resistance members, protesters, insurgents of the November and January uprisings and refugees from the Russian Partition of Poland fleeing conscription into the Russian Army. Insurgents of the November Uprising were also imprisoned in Biskupia Górka. In October and November 1831, several Polish cavalry units of the November Uprising stopped near the city on the way to their internment places, and in May–June 1832 and November 1833, more than 1,000 Polish insurgents departed partitioned Poland through the city's port, boarding ships bound for France, the United Kingdom and the United States (see Great Emigration).

With the Industrial Revolution and the steam engine trains, industrial machinery and Ferdinand Schichau's Schichau-Werke company gained the upper hand for Elbing over Danzig. Schichau later constructed a large shipyard in Danzig as well.

From 1824 until 1878, East and West Prussia were combined as a single province within the Prussian Kingdom. As a part of Prussia Danzig was a member of the Zollverein and elected its representatives to the German National Assembly of 1848, but lay outside of the borders of the 1815–1866 German Confederation. In the second half of the 19th century the growth of the German population in the city was being slowly reversed, with more Poles settling in, mainly from Pomerania, and parts of the local population discovering their Polish roots.

In 1871 the city was included in the newly created German Empire. The Polish minority in the city started its activities in the late 1870s and 1880s with the creation of Polish organisation Ogniwo and formation of Polish bank Bank Bałtycki. In 1891 a Polish newspaper called Gazeta Gdańska was printed, later joined by two publishing houses and a printing press. Local Poles focused their cultural life in the vicinity of Church of Saint Anna.

In 1907 local Poles from the "Straż" movement organised protests against Prussian policies of Germanization, including a ban on Polish language and expropriation of Polish home owners.

Free City (1920–1939)
Following Germany's defeat in World War I, the Allied powers in the Treaty of Versailles (1919) decided to create the Free City of Danzig (under a commissioner appointed by the League of Nations) covering the city itself, the seaport, and a substantial surrounding territory. The League of Nations rejected the citizens' petition to have their city officially named as the Free Hanseatic city of Danzig (Freie Hansestadt Danzig). The citizens of Danzig received a separate citizenship of the Free City and thus lost their former German citizenship. A customs union with Poland was created by the victorious allies of World War I, and Poland's rights also included free use of the harbour, a Polish post office and a Polish garrison in Westerplatte district. This arrangement was inspired by the history of the city, which for hundreds of years was part of Poland, with which it shared economic interests, thanks to which it flourished, and within which it enjoyed wide autonomy.

According to the official census of 1923 3.7 percent of city population was Polish (13,656 out of 366,730 citizens of the Free City) and in the 1920s and 1930s the city's population was over 90% German. However Polish claims range up to around 22.000, or around 6% of the population, and increased to around 13% in the 1930s. Other estimates give the number of Poles as 17% in the whole area of the Free City In the elections to the Free City of Danzig's Parliament the results of Polish Parties declined from 6.08 percent of votes in 1919 to 3.15 in 1927 and 3.53 in 1935. According to Henryk Stępniak many Poles voted for the Catholic Zentrumspartei instead and, based on these assumed voting patterns, he estimates the number of Poles in the city to be 25-30% of Catholics living within it or about 30-36 thousand people. In addition around 4,000 Polish nationals were registered in the city, bringing the total number of Polish population to 9.4-11% of people in this estimate. According to other estimates about 10 percent of the 130,000 Catholics were Polish. Piotr Mickiewicz claims, the city authorities were made up of former Prussian officials who were hostile to Poland and Poles. According to Artur Hutnikiewicz the Polish population faced discrimination and persecution in the Free City, which it tried to resist. Poles faced discrimination from German officials in employment and in education. This constituted violation of international laws, which obliged the city to treat Poles equally to Germans.

The Free City of Danzig issued its own stamps and currency (the Gulden). Many examples of stamps and coins, bearing the legend Freie Stadt Danzig, survive in collections. The strategic aim of Poland was to gain free access to the open sea, and the territories assigned to Poland in the Treaty of Versailles provided a good opportunity to do so. However, during the Polish-Soviet War, Danzig workers went on strike to block delivery of ammunition to the Polish army when the Soviet Red Army tried to capture Warsaw. The Second Polish Republic then built a military transit depot with a small squad of troops at Westerplatte.

Due to the massive resentment by the Danzigers and with large foreign investments, Poland began building a large military port in Gdynia, just 25 km away from Danzig. Unlike Danzig, Gdynia was in the direct possession of Poland and soon became the so-called "Polish outside window".

Due to a German-Polish customs war between 1925 and 1934, Poland became focused on international trade; for example, a new railway line was built to connect Silesia with the coast and the new tariffs made it cheaper to send goods through Polish ports rather than German ones. Gdynia became the biggest port on the Baltic sea. Nevertheless, Poland resorted to economic sanctions during the Danzig-Polish conflicts and Danzig suffered greatly. There was a strong desire to rescind the Allied Powers' decision on the status of the city's 400,000 citizens which were predominantly German. This culminated in the election of a National Socialist government in Danzig's elections in May 1933.

The German incorporation of Danzig was a territorial claim that every government of the Weimar Republic put on its agenda.

A German–Polish declaration of non-aggression was signed and the Free City's government was ordered by the Nazis to stop making problems between Poland and Danzig. Poland and Danzig entered a brief period of good economic cooperation and prosperity. Nevertheless, a totalitarian society was being constructed in Germany, and especially members of the Polish or Jewish minority required stamina in the face of everyday acts of violence and persecution from the Nazis. With the growth of Nazism among Germans, anti-Polish sentiment increased and both Germanisation and segregation policies intensified, in the 1930s the rights of local Poles were commonly violated and limited by the local administration. Polish children were refused admission to public Polish-language schools, premises were not allowed to be rented to Polish schools and preschools. Due to such policies, only 8 Polish-language public schools existed in the city, and Poles managed to organize 7 more private Polish schools. In 1937, Poles who sent their children to private Polish schools were demanded to transfer children to German schools, under threat of police intervention, and attacks were carried out on Polish schools and Polish youth.

German militias carried out numerous beatings of Polish activists, scouts, and even mailmen, as "punishment" for distributing the Polish press. German students attacked and expelled Polish students from the technical university. Dozens of Polish surnames were forcibly Germanized, while Polish symbols that reminded that for centuries Danzig was part of Poland were removed from the city's landmarks, such as the Artus Court and the Neptune's Fountain.

From 1937, the employment of Poles by German companies was prohibited, and already employed Poles were fired, the use of Polish in public places was banned and Poles were not allowed to enter several restaurants, in particular those owned by Germans. In 1938, the Germans committed over 100 attacks on Polish homes on the day of the Polish 3 May Constitution Day. In 1939, before the German invasion of Poland and outbreak of World War II, local Polish railwaymen were victims of beatings and arrests.

About 50 percent of members of the Jewish Community of Danzig had left the city within a year after a pogrom in October 1937, after the Kristallnacht riots in November 1938 the community decided to organize its emigration and in March 1939 a first transport to Mandate Palestine started. By September 1939 barely 1,700 mostly elderly Jews remained. In early 1941 just 600 Jews were still living in Danzig who were later deported to the ghetto in Warsaw or to Theresienstadt. The majority of them were later sent to various extermination camps. Out of the 2938 Jewish community in the city 1227 were able to escape from the Nazis before the outbreak of war

World War II (1939–1945)
Following the annexation of Austria and the Sudetenland, Germany in October 1938 urged the Danzig territory's cession to Germany. On 1 September 1939 Nazi Germany invaded Poland, initiating World War II. On 2 September 1939 Germany officially annexed the Free City. The Nazi regime murdered the Polish postmen defending the Polish Post Office: this was one of the first war crimes during the war. Other Polish soldiers defending the Westerplatte stronghold surrendered after seven days of fighting. The German commander returned the sword to the Polish commander for putting up a brave fight, while the same time one the captured defenders, Kazimierz Rasinski was brutally tortured by Germans and murdered when he refused to reveal Polish communication codes. On September 1, the Germans assaulted the Polish Railway Administration and arrested its chief and employees. Captain Tadeusz Ziółkowski, who refused to allow the German battleship SMS Schleswig-Holstein to enter the port in the prior days, was also arrested, and then sent to Stutthof and murdered in 1940. On September 7, NSDAP organised night parade on Adolf-Hitlerstrasse to celebrate success. It was bombed by a single Polish hydroplane operating from Hel Peninsula piloted by Józef Rudzki and Zdzisław Juszczakiewicz. Six bombs each weighing 12.5 kg were dropped from very low height. In October 1939, Danzig, together with the prewar Pomeranian Voivodship to the south and west, became the German Reichsgau (administrative district) of Danzig-West Prussia. With the start of the war the Nazi regime began its policy of extermination in Pomerania; Poles, Kashubians and Jews and the political opposition were sent to concentration camps, especially neighbouring Stutthof where 85,000 victims perished. In September 1939, the Germans carried out arrests of over 800 Polish railwaymen, who were then deported to concentration camps and murdered in the following months. Also those arrested before the war were executed in various locations. The Germans also carried out mass arrests and executions of local Polish activists, even those who escaped to Gdynia and Warsaw. 29 Polish teachers from the city were murdered, and others were deported to concentration camps. Execution sites of said Poles included Piaśnica, Sztutowo, Nowy Port, Westerplatte and Berlin, whereas the defenders of the Polish Post were massacred in Zaspa.

The Einsatzkommando 16, SS Heimwehr-Sturmbann Gotze and SS Heimwehr Danzig, were formed in the city, before entering Polish Pomerania to commit crimes against Poles. Members of the local SS became leaders of the newly established German Selbstschutz in German-occupied Gdynia.

During the war, the Germans operated a Nazi prison in the city, an Einsatzgruppen-operated penal camp, a camp for Romani people, two subcamps of the Stalag XX-B prisoner-of-war camp for Allied POWs, and several subcamps of the Stutthof concentration camp within the present-day city limits. In August 1944, also two assembly centers for Allied POWs (AGSSt 32 and 33) were established by the Germans in the city, and were soon moved to other locations in German-occupied Poland and France.

In the city itself hundreds of prisoners were subjected to cruel Nazi executions and experiments, which included castration of men and sterilization of women considered dangerous to the "purity of Nordic race" and beheading by guillotine The courts and judicial system in the annexed territories of Nazi Germany was one of the main ways to legislate an extermination policy against ethnic Poles, terminology in the courts was full of statements such as "Polish subhumans" and "Polish rabble". Some judges even declared that Poles were to have tougher sentences than Germans because of their alleged racial inferiority. The Polish resistance movement was active in the city. The Poles smuggled documents about German V-weapons, infiltrated the local German industry, plus one of Pomerania's main smuggling points for underground Polish press was located in the city. The resistance also facilitated escapes of endangered Polish resistance members and British prisoners of war who fled from German POW camps via the city's port to neutral Sweden. The Home Army also co-operated with the local vice-consul of Denmark.

At the beginning of 1945, facing the imminent fall of the Nazi State, Germany started evacuating civilians from Danzig. Most Germans fled the city, many by seaborne evacuation to Schleswig-Holstein. This happened in winter under the threat of bombs and in constant danger of submarines.

After a siege, on 30 March 1945 the Soviet Red Army occupied a largely destroyed Danzig. The exact circumstances of the occupation remain a matter of dispute. While the traditional Polish historiography stressed the role of the German resistance, after 1990 reports about deliberate destructions and arsons by the Soviets were published. However, as Soviet sources about the events are inaccessible, the topic has not been conclusively clarified. In December 1945 the Soviet Consulate explained the existing "anti-Soviet feelings" with some "excesses" of the Red Army.

In June 1945 124,000 Germans and 8,000 Poles lived in the city, from 1945 to 1950 most Germans were expelled in accordance with the Potsdam Agreement.

Post-World War II
With the German defeat the planned genocide of the Polish population, who were deemed by the German authorities to be "subhuman," was averted and Poles returned to Gdańsk.

Already before the end of World War II, the Yalta Conference had agreed to place the city, under Polish name Gdańsk, under de facto administration of Poland, and this decision was confirmed at the Potsdam Conference.

A Polish administration was set up in the devastated Gdańsk on 30 March 1945. New Polish residents were settled in Gdańsk, 3,200 in April and more than 4,000 in May and June 1945. As of 1948 more than two thirds of the 150,000 inhabitants came from Central Poland, about 15 to 18 percent from Polish-speaking areas east of the Curzon Line that were annexed by the Soviet Union after World War II. Many local Kashubians also moved into the city. The deportation of the German populace started in July 1945, thus the pre-war populace soon became a small minority within post-war Gdańsk.

The members of the pre-war Polish minority in the city organized associations dedicated to upholding their past traditions and history; the first one being Związek Weteranów Walk o Polskość Gdańska i Wybrzeża. In the following years additional ones were founded like Towarzystwo Przyjaciół Gdańska which continues its work to this day.

Between 1952 and the late 1960s Polish artisans restored much of the old city's architecture, up to 90% destroyed in the war. Initially the reconstruction of parts of the inner city (Główne Miasto) was controversial. As a result of anti-German sentiments and the new settlers' at least indifferent attitude towards the unknown, German city a modern architecture was preferred. The decision to reconstruct a traditional old town was politically motivated in order to symbolize the city's reunification with Poland and limited to the area of the Główne Miasto. The Old town and other historical districts were, with the exception of some monumental buildings, built-up with modern architecture. The reconstruction is not tied to the city's pre-war appearance, instead its purpose was to rebuild an idealized pre-1793 state. 19th and early 20th-century architecture, any traces of German tradition were ignored or regarded as "Prussian barbarism" worth of demolition while Flemish-Dutch, Italian and French influences were emphasized. After 1990 this concept has been criticized by Donald Tusk, who called the reconstruction "in the spirit of Communism" the city's second catastrophe of the 20th century. The city districts were renamed to their historic Polish names (such as Wrzeszcz, Siedlce, Nowy Port), but in some cases the specifications of the Commission for the Determination of Place Names were initially ignored and place names originating in the home region of the settlers were used.

In 1946, the Soviet-installed communist regime executed 17-year-old Danuta Siedzikówna and 42-year-old Feliks Selmanowicz, Polish resistance members, in the local prison.

The port of Gdańsk was one of the three Polish ports through which Greeks and Macedonians, refugees of the Greek Civil War, reached Poland. In 1949, four transports of Greek and Macedonian refugees arrived at the port of Gdańsk, from where they were transported to new homes in Poland. Gdańsk was the scene of anti-government demonstrations which led to the downfall of Poland's communist leader Władysław Gomułka in December 1970, and ten years later was the birthplace of the Solidarity trade union movement, whose opposition to the government helped end of communist party rule in 1989 and the election as president of Poland of its leader Lech Wałęsa. It remains today a major port and industrial city.

A list of the 173 mayors of the city from 1347 to March 1945 was compiled by the current Gdańsk city government and can be found on their recent website with the invitation for the "First World Gdańsk Reunion", which took place in May 2002.

In 2014, the remains of Danuta Siedzikówna and Feliks Selmanowicz were found at the local Garrison Cemetery, and then their state burial was held in Gdańsk in 2016, with the participation of thousands of people from all over Poland and the highest Polish authorities.

In recent history, Gdańsk has co-hosted various international sports competitions, including the EuroBasket 2009, 2011 FIVB Volleyball World League, UEFA Euro 2012, 2013 Men's European Volleyball Championship, 2014 FIVB Volleyball Men's World Championship, 2016 European Men's Handball Championship, 2017 Men's European Volleyball Championship, 2021 Men's European Volleyball Championship, 2022 FIVB Volleyball Women's World Championship, 2023 World Men's Handball Championship and 2023 FIVB Volleyball Men's Nations League.

Famous people born in the city

 * List of people from Gdańsk
 * List of mayors of Gdańsk
 * List of mayors of Danzig
 * Johannes Dantiscus, 1485, poet, diplomat, church canon and bishop
 * Bernhard von Reesen, 1490
 * Albrecht Giese, 1524
 * Johannes Hevelius, 1611, astronomer
 * Daniel Schultz, 1615
 * Bogusław Radziwiłł, 1620, Polish princely magnate
 * Andreas Schlüter, 1660
 * Aleksander Benedykt Sobieski, 1677, Polish prince
 * Jacob Theodor Klein, 1685
 * Daniel Gabriel Fahrenheit, 1686–1736, physicist and engineer
 * Daniel Gralath, 1708, physicist and mayor
 * Louise Adelgunde Gottsched, 1713, writer
 * Daniel Chodowiecki, 1726, painter
 * Adam Kazimierz Czartoryski, 1734, Polish statesman and writer
 * Michał Jerzy Poniatowski, 1736, Archbishop of Gniezno and Primate of Poland, brother of King Stanisław August Poniatowski
 * Johann Wilhelm Archenholz, 1741
 * Avraham Danzig, 1748, rabbi
 * Georg Forster, 1754
 * Gottlieb Hufeland. 1760
 * Johanna Schopenhauer, 1766
 * Johannes Daniel Falk, 1768
 * Władysław Franciszek Jabłonowski, 1769, Polish general
 * Arthur Schopenhauer, 1788
 * Miltiades Caridis, 1923, conductor
 * Günter Grass, 1927, writer and philosopher
 * Zdzisław Kuźniar, 1931, actor
 * Janusz Kupcewicz, 1955, footballer
 * Paweł Huelle, 1957, writer and journalist
 * Donald Tusk, 1957, politician, journalist and historian, former prime minister of Poland
 * Dariusz Michalczewski, 1968, boxer
 * Leszek Możdżer, 1971, jazz musician

Famous people living or working in the city

 * Edward O'Rourke, the first bishop of the Diocese of Danzig
 * Lech Wałęsa, b. 1943, trade unions activist, politician, president of Poland (1990–1995)
 * Stanisław Pestka, b. 1929 in Rolbik - Kashubian poet
 * Robert Gordon b. 1668, d. 1731, Merchant and philanthropist