Duchy of Gdańsk

The Duchy of Gdańsk was a duchy in Pomerelia with its capital in Gdańsk. It was formed in 1227 from the partition of the Duchy of Pomerelia and existed until 1270 when it was incorporated back into it.

History
In 1227, after the Gąsawa massacre in which had died Leszek the White, the High Duke of Poland, the Duchy of Pomerelia had achieved independence from the Kingdom of Poland. Following that, the duke of Pomerelia, Swietopelk II, partitioned the county between himself and his brother, Warcisław I of Świecie, to whom he gave the area that formed the Duchy of Świecie and Lubiszewo. Warcisław I died between 1227 and 1233. After his death his duchy was divided between Swietopelk II, who got the area of Świecie, Sambor II, who got the Duchy of Lubiszewo, and Racibor of Białogarda, who got Duchy of Białogarda. Following gaining independence, Swietopelk II began developing the administration hierarchy in his duchy, appointing castellans, voivodes, deputy chamberlains, treasurer and others. It gained him the support of the aristocracy for the idea of independent Pomerelia. In 1231 he and his family gained the protection of Pope Gregory IX.

He was actively supporting the Christianisation of Prussia and took part in the Prussian Crusade. In 1234 he participated in the military campaign of the Kingdom of Poland and the State of the Teutonic Order against Prussians. The campaign ended with the victorious battle of Dzierzgoń. Between 1236 and 1238, Swietopolk conquered and annexed Pomerania-Schlawe.

On 15 June 1236, Swietopelk announced to his brothers that he had designated his oldest son, Mestwin II, as his successor as the duke of Pomerelia. It was against the agnatic seniority law, which stated that the eldest brother should be the successor. At the time, Sambor II, with the help of the Teutonic Order, had started fortifying the settlement of Gorzędziej. In the autumn of the same year, Swietopelk attacked it, defeating Sambor's forces and conquering the Duchy of Lubiszewo. After the fight, he spared the life of his brother Sambor, exiling him from the country. Additionally, Swietopelk II formed an alliance with Sambians, Natangians and Warmians.

Following that, Sambor II had aligned with forces from Mecklenburg. Around 1237, the Mecklenburgian fleet began fighting with Gdańsk forces alongside the coasts of the Baltic Sea, later on entering the Vistula river. In 1237 or at the beginning of 1238, Ratibor fortified Białogarda, and, assisted by troops of Kuyavian bishop, attacked the Schlawe and Stolp Land, which he subsequently conquered and plundered. At the same time Sambor II captured the settlement of Słońca. On 1 March 1238, Sambor II, together with Mecklenburgian troops, travelled to Białogarda in order to pursue Ratibor, to unite in the war against Swietopelk II. Soon after, Swietopelk II defeated Sambor in the battle of Słońca, capturing the brother and keeping him captive in the settlement until around 1239. Then he attacked Białogarda, destroying the army of Ratibor, conquering his duchy, and burning its capital subsequently. Ratibor was also exiled to Kuyavia until 1239.

Soon after, the Duchy of Kuyavia, led by Casimir I, attacked the Duchy of Gdańsk, conquering the Bydgoszcz Castellany. On 11 June 1238, Swietopelk signed an agreement with the Teutonic Order, according to which he wouldn't enter alliances with Prussian tribes. In August 1238, Swietopelk organized the raid on the Duchy of Kuyavia, aimed against duke Casimir I and bishop Michał, as the response to the previous attack. During the attack, his army destroyed around 23 villages and the properties of bishops and monasteries, as well as devastating the town of Inowrocław, and stole a massive number of farm animals. Following the attack, Swietopelk was excommunicated from the Catholic Church. On 30 November 1238, Swietopek was put on trial by Polish episcopal conference, against bishops of Kuyavia and Płock, Strzelno monastery and Gdańsk Dominicans, all of whom were victims of his raid. By the trial verdict, he had to financially and materially compensate victims in order to end his excommunication. He never managed to fulfil it. In 1239, around Easter, Swietopelk released Sambor II and allowed Ratibor to come back from his exile, giving them both their duchies back. In return, both brothers had to pledge their allegiance to Gdańsk.