This Castle protected valuable salt production and served as the abode of the mining administration from the 13th century until year 1945. It was from here that the Cracow Saltworks were administered, which until the 18th century included the Saltworking facilities and mines in Wieliczka and Bochnia. “Poland is worth nothing without Bochnia and Wieliczka” was a popular saying in the Old Polish times. At the time, the Cracow Saltworks were the biggest Polish enterprise and one of the biggest in Europe. The value of salt produced here is proven by the fact that even as much as one third of all royal revenues were earned here in the 14th century! The castle witnessed annual visits of Polish monarchs in the Middle ages. Many renowned guests also came here in the later times. in 1683, an apartment with a toilet was arranged for queen Maria Kazimiera Sobieska to let her stay overnight in comfortable conditions, awaiting her famous husband on his way back from Vienna after his victory over the Turks.