The family also provided two Holy Roman Emperors (1328–1347/1742–1745), one King of the Romans (1400–1410), two Anti-Kings of Bohemia (1619–20/1742–43), one King of Hungary (1305–1309), one King of Denmark and Norway (1440–1448) and one King of Greece (1832–1862). The Wittelsbach dynasty ruled the German territories of Bavaria from 1180 to 1918 and the Electorate of the Palatinate from 1214 until 1805; in 1815 the latter territory was partly incorporated as Rhine Palatinate into Bavaria, which Napoleon elevated to a kingdom in 1806. On Duke Otto II's death in 1253, his sons divided the Wittelsbach possessions between them: Henry became Duke of Lower Bavaria, and Louis II Duke of Upper Bavaria and Count Palatine of the Rhine. When Henry's branch died out in 1340 the Emperor Louis IV, a son of Duke Louis II, reunited the duchy. The family provided two Holy Roman Emperors: Louis IV (1314–1347) and Charles VII (1742–1745), both members of the Bavarian branch of the family, and one German King with Rupert of the Palatinate (1400–1410), a member of the Palatinate branch. The House of Wittelsbach split into these two branches in 1329: Under the Treaty of Pavia, Emperor Louis IV granted the Palatinate including the Bavarian Upper Palatinate to his brother Duke Rudolf's descendants, Rudolf II, Rupert I and Rupert II. Rudolf I in 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. The Bavarian branch kept the duchy of Bavaria until its extinction in 1777. The Wittelsbach Emperor Louis IV acquired Brandenburg (1323), Tyrol (1342), Holland, Zeeland and Hainaut (1345) for his House but he had also released the Upper Palatinate for the Palatinate branch of the Wittelsbach in 1329. His six sons succeeded him as Duke of Bavaria and Count of Holland and Hainaut in 1347. The Wittelsbachs lost the Tyrol with the death of duke Meinhard and the following Peace of Schärding – the Tyrol was finally renounced to the Habsburgs in 1369.