The Lombard dukes of Friuli ruled Aquileia and the surrounding mainland territory from Cividale. In 774, Charlemagne conquered the Lombard duchy and made it into a Frankish one with Eric of Friuli as duke. In 787, Charlemagne named the priest and "master of grammar" at the Palace School of Paulinus II, the new patriarch of Aquileia. The patriarchate, despite being divided with a northern portion assigned to the pastoral care of the newly created Archbishopric of Salzburg, would remain one of the largest dioceses. Although Paulinus resided mainly at Cividale, his successor Maxentius considered rebuilding Aquileia. However, the project never came to fruition.