The Pavia Castle, built by Galeazzo II Visconti from 1360 onwards, became a refined court residence rather than a defensive fortress. This is suggested by the decorations, such as the elegant double lancet windows and the interior frescoes in which scenes of battles, court life and hunting can still be recognised. Galeazzo, in fact, gave great importance to the decorative apparatus, so much so that in 1366 he asked Guido Gonzaga to send him the best painters, making the castle a centre of artistic production. Of great importance are two rooms in the south-west tower: the ‘Sala Azzurra’, decorated in 1475 with gilded geometric motifs, stars and family emblems; and the room that once housed the Visconti Library, one of the most important in Europe, for which even Petrarch was consulted. The castle, completed at the end of the 14th century, was severely damaged during the Battle of Pavia in 1525 and was used as barracks until 1921. Purchased by the municipality in the 20th century, the structure was restored and used as a cultural venue, and today houses the Civic Museums and temporary exhibitions.