Another ruler of this state,
From 1886 to 1912, this polity was governed by a the reformist regent Luitpold. One ruler of this polity divided its lands among his sons in the 1329 Treaty of Pavia. Another ruler of this state, Maximilian I, was able to acquire Austrian territory via the Treaty of Pressburg as a reward for joining the Confederation of the Rhine. Joseph II and Frederick the Great fought a (*) succession war for control of this polity, which was ruled by Louis IV before he became Holy Roman Emperor. Its ruling family was founded by Otto V, and its king Maximilian II allied this state with Saxony, Hannover, and Wurttemberg in a futile effort to counterbalance Prussia. For 10 points, identify this German state, which until 1918 was ruled by the Wittelsbach dynasty and has its capital at Munich.
From 1886 to 1912, this polity was governed by a the reformist regent Luitpold.
Bavaria [or Bayern]