 It became the seat of a Castellan and prospered from the 13th century to the first half of the 17th century, being on an international trade route bordering Hungary and the Ottoman Empire.It had town and market rights, its church was raised to collegiate status with links to the Jagiellonian University in Kraków 64 km away.It was the scene of the Battle of Wojnicz on 3 October 1655, against Swedish invaders.