In the first half of the 14th century King Casimir the Great ordered here the erection of a castle intended as a part of the whole defence system created by the strongholds guarding the Polish-Silesian border. The castle also protected the important trade route connecting Cracow with Wrocław. From the end of the 14th century it was a residence of some Polish aristocratic families. The first private owners of Pieskowa Skała were members of the Szafraniec family, who rebuilt and enlarged the castle. In the 14th century they built the lower castle with 2 cylindrical towers on the steeply sloping east side, and in the 16th century they modernized this part of the building, creating a Renaissance arcaded courtyard in the north-Italian style, with sculptural decoration (gallery of masks and shields with coats of arms) of a Netherlandish character. In the 17th century Michał Zebrzydowski ordered new defences closing the outer court to be erected. In the 18th century, when the castle was the property of the Wielopolski family, Pieskowa Skała was a famous hunting site. In the time of the partition of Poland Pieskowa Skała became a favourite place for excursions and was called the Museum of Poland. In the last years of the 19th century the neglected castle was rescued by a group of people from Warsaw who organized a pension there. After World War II the Pieskowa Skała castle was nationalised, restored under the direction of Professor Alfred Majewski, and in 1970 opened as a museum - a department of the Royal Wawel Castle in Cracow.