Over the centuries, the castle underwent numerous transformations resulting from destruction or the need to adapt it to new functions. In the 19th century, during the period of the Partitions of Poland when the Austrian army occupied the castle, the residence of the kings of Poland was converted into barracks. At that time, the galleries, which were falling into disrepair, were bricked up. After the partitioning army left the castle in 1905, restoration work began under the direction of Zygmunt Hendel (1909–1914), thanks to whom the courtyard was largely restored to its original appearance. Only a small part of the courtyard’s original Renaissance stonework has survived to the present day. Damaged or destroyed elements have been replaced with faithful copies. The preserved original architectural details are collected collected in the lapidarium of the Lost Wawel exhibition.