The area became part of the emerging Polish state in 967.[1] In the Middle Ages, in the 10th-12th centuries, two strongholds existed at the site.[2] It was part of medieval Poland and the Duchy of Pomerania after it split off from Poland during the fragmentation of the realm in the mid-12th century.