As the last of the junior branch of the Wittelsbach dynasty which derived from Louis IV, Holy Roman Emperor and had ruled Bavaria since early 14th century, Maximilian's death led to a succession dispute and the brief War of the Bavarian Succession. He was succeeded by his distant cousin, the Elector Palatine Charles Theodore from the senior branch of the dynasty.