During the Spanish occupation, one of the older buildings of the Courtyard of Arms was repurposed, by order of the castle governor, Sancho de Guevara y Padilla, to serve as an infirmary for the soldiers of the garrison. The ceiling of the infirmary depicted the apostles surrounded by garlands and scrolls bearing the apostles creed, while one of the walls carries the Spanish Royal Coat of Arms and another the Arms of the Spanish nobility. A graffito with the date 1517 probably coincides with the year in which the decoration was completed. The hospital and adjacent pharmacy were in use until at least the 18th century. Thanks to the Mangili bequest, the building was restored by Luca Beltrami in 1907, who, between 1907 and 1908 also had the top floor demolished, without however touching the internal spaces.