both Carinthia and Verona were under the control of the dukes of Bavaria, forming a massive Italian, German, and Slavic fief ruled by relatives of the Saxon Ottonian dynasty. After several revolts led by his Bavarian cousins, Emperor Otto II in 976 deposed Duke Henry II of Bavaria and established the Duchy of Carinthia under the loyal Luitpolding vassal Henry the Younger on the southeastern territories. He also received Verona as a Carinthian march and from that time on, it was under the control of the Carinthian dukes and at other times not. Already in 975, a commune had been chartered in the capital city, when Otto II ceded to Verona the powers of the marquisate. From this time Verona and several other cities in the march gradually developed into independent city-states, and in turn the title Margrave of Verona became an essentially empty hereditary honour in the ducal houses of Bavaria and Carinthia. Henceforth the Holy Roman Emperors began to appoint vicars to represent them, instead of margraves, in Verona. From 1004 King Henry II of Germany, having conquered the Kingdom of Italy, allotted several Veronese territories in the Adige Valley around Trento (Trient) to the Bishops of Trent. His Salian successor, Emperor Conrad II, upon his coronation in 1027 separated these lands from the Italian kingdom and gave the Trent bishops immediate authority, elevating them to the rank of Imperial Prince-Bishops. Trentino remained under episcopal rule—contested by the Counts of Tyrol—until its secularisation in 1803. In 1061 Empress Agnes enfeoffed the Swabian count Berthold from the House of Zähringen with Carinthia and Verona. Though he could not prevail, neither as Carinthian duke nor as Veronese margrave, he bequested the title to his descendants from the House of Baden, who went on to rule their Swabian territories as a "Margraviate". At that time in 1070, Istria was resurrected into a march again and detached from Verona, while in the course of the Investiture Controversy in 1077 the territories of Friuli in the east, around the episcopal city of Aquileia were separated from the March to provide an ecclesiastical Patriarchate of Aquileia, like Trent an immediate vassal of King Henry IV of Germany. In 1151 the Hohenstaufen King Conrad III of Germany finally divested Duke Henry V of Carinthia of the remaining Veronese march and enfeoffed Margrave Herman III of Baden. However, in 1164, the most important cities formed the