 Complete the following phrase:  The castle was held in fief by a long series of masters: the Patriarchate of Aquileia, the Counts of Gorizia, the city of Cividale del Friuli, the Venetian Republic, and finally the Habsburgs. It appears to have functioned as a dedicated fortress rather than a residence, and had no permanent civilian population in peacetime, only a large garrison; it also housed a prison. The structure was severely damaged in the earthquakes of 1348 and 