Built on the initiative of King Casimir III the Great around 1350; it belonged to the system of border strongholds. In the 19th century a great treasure was discovered here.