In 1348, King Kazimierz Wielki built here Kamieniec Castle, which remained private property of the Kamieniecki family. In 1475, the castle was attacked by Hungarian troops of Matthias Corvinus. On March 12, 1526, Crown Hetman Marcin Kamieniecki invited to the castle Hungarian King John Zapolya, also Fausto Sozzini visited Kamieniec. On December 7, 1655, near Odrzykoń, a choragiew of Gabriel Wojnillowicz defeated Swedes in the Battle of Krosno (see Deluge (history)). On March 16, 1657, the army of George II Rakoczi, allied with the Swedish Empire, entered southern Poland, capturing and burning the Kamieniec Castle. Rebuilt, the complex was once again destroyed by Swedes during the Great Northern War. During Bar Confederation, Polish rebels found refuge in the ruined and neglected castle.