The Duchy of Bavaria (German: Herzogtum Bayern) was a frontier region in the southeastern part of the Merovingian kingdom from the sixth through the eighth century. It was settled by Bavarian tribes and ruled by dukes (duces) under Frankish overlordship. A new duchy was created from this area during the decline of the Carolingian Empire in the late ninth century. It became one of the stem duchies of the East Frankish realm which evolved as the Kingdom of Germany and the Holy Roman Empire. During internal struggles of the ruling Ottonian dynasty, the Bavarian territory was considerably diminished by the separation of the newly established Duchy of Carinthia in 976. Between 1070 and 1180 the Holy Roman Emperors were again strongly opposed by Bavaria, especially by the ducal House of Welf. In the final conflict between the Welf and Hohenstaufen dynasties, Duke Henry the Lion was banned and deprived of his Bavarian and Saxon fiefs by Emperor Frederick Barbarossa. Frederick passed Bavaria over to the House of Wittelsbach, which held it until 1918. The Bavarian dukes were raised to prince-electors during the Thirty Years' War in 1623, and to kings by Napoleon in 1806. The duchy chaired the bench of the secular princes to the Reichstag of the Empire. Geography The medieval Bavarian stem duchy covered present-day Southeastern Germany and most parts of Austria along the Danube river, up to the Hungarian border which then ran along the Leitha tributary in the east. It included the Altbayern regions of the modern state of Bavaria, with the lands of the Nordgau march (the later Upper Palatinate), but without its Swabian and Franconian regions. The separation of the Duchy of Carinthia in 976 entailed the loss of large East Alpine territories covering the present-day Austrian states of Carinthia and Styria as well as the adjacent Carniolan region in today's Slovenia. The eastern March of Austria —roughly corresponding to the present state of Lower Austria— was likewise elevated to a duchy in its own right by 1156. Over the centuries, several further seceded territories in the territory of the former stem duchy, such as the County of Tyrol or the Archbishopric of Salzburg, gained Imperial immediacy. From 1500, a number of these Imperial states were members of the Bavarian Circle of the Holy Roman Empire. History Older stem duchy The origins of the older Bavarian duchy can be traced to the year 551/555.