Popes over a period of several centuries to establish Gregorian hegemony. A chronicle by the Milanese historian Landolphus from around the year 1000 recounts a legend that two Sacramentaries, one Gregorian and one Ambrosian, were placed on an altar to see which chant had divine acceptance; miraculously, both books opened simultaneously, showing both were equally acceptable. Ambrosian chant did not wholly escape Gregorian influence. The earliest 8th-century fragments, and the more complete chantbooks from the 11th and 12th centuries that preserve the first recorded musical notation, show marked differences between the Gregorian and Ambrosian repertories. Later additions to the Ambrosian repertory, whose style differs from the earlier chants, may reflect Gregorian influence. Although St. Charles Borromeo fought to keep the Ambrosian rite intact during Spanish occupation, a contemporary edition of Ambrosian chant, published by Perego in 1622, attempts to categorize the Ambrosian chants into the eight Gregorian modes, which is not generally accepted as an accurate reflection of the actual musical practice of the time. Ambrosian chant has survived to the present day, although its use is now limited primarily to the greater part of the Archdiocese of Milan and environs, parts of Lombardy, and parts of the Swiss Diocese of Lugano. Most recently, it survived the changes to the liturgy established by Vatican II, in part due to the prior tenure of Pope Paul VI as Archbishop of Milan. General characteristics Ambrosian chant is largely defined by its role in the liturgy of the Ambrosian rite, which is more closely related to the northern "Gallic" liturgies such as the Gallican rite and the Mozarabic rite than the Roman rite. Musically, however, Ambrosian chant is closely related to the Gregorian and Old Roman chant traditions. Many chants are common to all three, with musical variation. Like all plainchant, Ambrosian chant is monophonic and a cappella. In accordance with Roman Catholic tradition, it is primarily intended to be sung by males, and many Ambrosian chants specify who is to sing them, using phrases such as cum Pueris (by a boys' choir) and a Subdiaconis (by the subdeacons). Stylistically, the Ambrosian chant repertoire is not generally as musically uniform as the Gregorian. Ambrosian chants are more varied in length, ambitus, and structure. Even within individual categories of chant, Ambrosian chants vary from short and formulaic to prolix and melismatic, and may be freely composed or show significant internal melodic structure. Its most