In fourteenth century Żarnowiec, together with all of Pomerelia was annexed from Poland by the Teutonic Order. In 1433, it was raided by a Hussite army. In 1454 the territory was formally re-incorporated into the Kingdom of Poland by King Casimir IV Jagiellon. In 1462, during the subsequent Thirteen Years' War, the Polish army under Piotr Dunin defeated the Teutonic Knights there (see Battle of Świecino, also known as the Battle of Żarnowiec). After the war Żarnowiec was confirmed as part of Poland, and administratively was included in the Pomeranian Voivodeship in the province of Royal Prussia in the Greater Poland Province.