in 1404, he was succeeded in the Netherlands by his eldest son, William. A younger son, John III, became Bishop of Liège. However, on William's death in 1417, a war of succession broke out between John and William's daughter Jacqueline of Hainaut. This last episode of the Hook and Cod wars finally left the counties in Burgundian hands in 1433. Emperor Louis IV had reunited Bavaria in 1340 but from 1349 onwards Bavaria was split among the descendants of Louis IV, who created the branches Bavaria-Landshut, Bavaria-Straubing, Bavaria-Ingolstadt and Bavaria-Munich. With the Landshut War of Succession Bavaria was reunited in 1505 against the claim of the Palatinate branch under the Bavarian branch Bavaria-Munich. From 1549 to 1567 the Wittelsbach owned the County of Kladsko in Bohemia. Strictly Catholic by upbringing, the Bavarian dukes became leaders of the German Counter-Reformation. From 1583 to 1761, the Bavarian branch of the dynasty provided the Prince-electors and Archbishops of Cologne and many other Bishops of the Holy Roman Empire, namely Liège (1581–1763). Wittelsbach princes served for example as Bishops of Regensburg, Freising, Liège, Münster, Hildesheim, Paderborn and Osnabrück, and as Grand Masters of the Teutonic Order. In 1623 under Maximilian I the Bavarian dukes were invested with the electoral dignity and the duchy became the Electorate of Bavaria. His grandson Maximilian II Emanuel, Elector of Bavaria served also as Governor of the Habsburg Netherlands (1692–1706) and as Duke of Luxembourg (1712–1714). His son Emperor Charles VII was also king of Bohemia (1741–1743). With the death of Charles' son Maximilian III Joseph, Elector of Bavaria the Bavarian branch died out in 1777. Palatinate branch The Palatinate branch kept the Palatinate until 1918, having succeeded also to Bavaria in 1777. With the Golden Bull of 1356 the Counts Palatine were invested with the electoral dignity, their county became the Electorate of the Palatinate. Princes of the Palatinate branch served as Bishops of the Empire and also as Elector-Archbishops of Mainz and Elector-Archbishops of Trier. After the death of the Wittelsbach king Rupert of Germany in 1410 the Palatinate lands began to split under numerous branches of the family such as Neumarkt, Simmern, Zweibrücken, Birkenfeld, Neuburg and Sulzbach. When the senior branch of the Palatinate branch died out in 1559, the Electorate passed to Frederick III of Simmern, a staunch Calvinist, and the Palatinate became one of the major centers of Calvinism in Europe, supporting Calvinist rebellions