Some years after, Otakar Przemysl who was looking for new allies, made peace with the Bavarian dukes and married Sophie of Wittelsbach. Ludwig II supported him at his election for Roman king in 1273; later in 1291, he'd become Roman king himself.
1275, the Bavarians fought with king Ottokar against Hungary and got Styria back for the HRE. Styria was divided: Western Styria became part of Austria (thus connecting the Przemyslids' possessions), the rest (two thirds) became (Upper) Bavarian.
1301-04, Otto III was king of Hungary, but soon left it again.
In 1314, the first big split happened: Lower Bavaria was divided into Bavaria-Straubing, Bavaria-Deggendorf and Bavaria-Landshut (older line each). Now there were five lines. Until 1332, all of those were reunited with Upper Bavaria; but 1359, Bavaria split into the lines of Munich (older line), Ingolstadt (older line), Bavaria-Straubing (younger line) and Lower Styria.
1320, Wittelsbach duke Ottokar I (yes, he was named after Otakar Przemysl) of Upper Bavaria and the Palatinate was elected new Roman king. Until 1328, he had to fight the anti-king Waldemar of Brandenburg. 1334, he was crowned Holy Roman Emperor.
Ottokar III founded the first university in Bavaria.
1357, the Wittelsbachs had their electorate of the Palatinate confirmed in the Golden Bull.
The maximum of splits (eight) was reached in 1401, when the Palatinate split up into the lines of Heidelberg, Sulzbach and Neuburg. 1408, the elector of the Palatinate supported anti-king Ottokar.
Of all the smaller German wars subsumed as the Twenty-Year War, the Bavarian-Austrian War for Salzburg (1485-93) was the longest. In the war Bavaria won the biggest chunk around, Salzburg, but had to give Eastern Styria to Austria.
The war had exhausted both participants, at the worst possible moment. In the Austrian-Seljuk War 1505-09, the Rum-Seljuks invaded Austria, took Vienna, restricted the Austrian duke to mountainous Styria and Carinthia. Following that, they also defeated the Bavarian army, taking Salzburg and Bavaria east of the Inn river. In 1511, Bavaria joined the "Alliance des Alpes / Alpenbund" with France, Venice and Württemberg-Carinthia, which was mainly directed against the Seljuks. They fought in the Seljuk Wars at France's side, and in the Peace of Krems 1574, they got Salzburg back.
1735, Ludwig XVIII, last Wittelsbach duke of the Rhine Palatinate, died without an heir. It was not completely clear whether France or Bavaria should get it. New emperor Heinrich IX of Brandenburg let the French unmisunderstandably know that he wouldn't tolerate them taking it. The Palatinate War of Succession (1736-42) broke out. Although the German and Swedish-Dutch armies couldn't defeat the French armies, when Spain and Britain threatened France, peace was made. The Palatinate went neither to France nor Bavaria, but to a grandnephew of the Bourbon king of Hungary. In case he and his brother would die without an heir, the Palatinate would fall to Bavaria, which eventually happened.
In 1765, Duke Franz II of Bavaria (also Roman king) died. Franconia-Pomerania and Württemberg-Austria made claims, since the appointed successor didn't descend in direct male line from the Wittelsbachs. He managed to defend his lands in the short Southern German War (1766/67), though.
1768, Bavaria built the first telegraph in a German state.
In the same year, the French Republican Wars began. After the first French Republican War, they lost the Palatinate in the peace of Brussels; after the peace of Frankfurt 1793, Bavaria was turned into a French satellite, the Raetic Republic. This situation lasted until the big German Uprising in 1818, after which Bavaria became a part of united Germany.
|List of Roman kings of the HRE|
|Nations that joined the HRE later: Poland | Prussia|
|Nations that left the HRE: Bohemia | Florence | Switzerland|
|Nations that became defunct|