 After a period under the Milanese family De Advocati, the town was a possession of the archbishops of Milan until the 16th century.A series of abbeys were founded in the area by Bernard of Clairvaux during the 11th century.Later Frederick Barbarossa resided here after his destruction of Milan, while the Visconti and the Torriani fought here (1278) for the possession of the duchy of Milan.