Treaty of Pavia (1329)
Under the accord, Emperor Louis IV granted during his stay in Italy the Electorate of the Palatinate including the Bavarian Upper Palatinate to his older brother Duke Rudolph's descendants, Rudolph II, Rupert I and Rupert II. Louis himself kept Upper Bavaria (Oberbayern)and inherited also Lower Bavaria in 1340. Rudolph I this way became the ancestor of the older (Palatinate) line of the Wittelsbach dynasty, which returned to power also in Bavaria in 1777 after the extinction of the younger (Bavarian) line, the descendants of Louis IV. It had been agreed with the Treaty of Pavia that with the extinction of one of the branches, the other branch would inherit their possessions. According to the treaty, the electoral rights should alternate but with the Golden Bull of 1356 only the Palatinate line was invested with the electoral dignity.