 After the Treaty of Templin in 1317 the city passed to the Duchy of Pomerania-Wolgast.In 1368 Pomerania-Stolp ("Duchy of Słupsk") was split off from Pomerania-Wolgast due to the Partitions of the Duchy of Pomerania.The grandson of Polish King Casimir III the Great and his would-be successor Casimir IV became duke of Słupsk as a Polish vassal in 1374, after he failed to take the Polish throne.