House of Pomerania
The Kingdom of Poland took control of the castle during the Thirteen Years' War. In 1466, King Kazimierz Jagiellończyk ceded the castle to the fiefdom, Duchy of Pomerania, then ruled by Eric II, duke of Pomerania. In 1500, the stronghold was surrounded with fortifications and bastions. In the second half of the 16th century, the castle was the residence of the House of Pomerania, which in the years 1560-1570 had their living quarters in the southeastern wing. The Thirty Years' War wrought little damage to the stronghold. Along with the death last member of the House of Pomerania in 1638, the castle was made the residence of the starosta.