Religious ties and the Upper German language linked the state more to Austria until their defeat in the Austro-Prussian War.
King Ludwig II signed an alliance with Prussia on 22 August 1866, effectively relinquishing Bavarian independence.
With the treaty of 23 November 1870 Bavaria was integrated into the new German Empire, but permitted a relatively large degree of self-determination.
When the German Empire was abolished in November 1918 after the end of World War I, the last king of Bavaria, Ludwig III, was deposed.
[1] Otto was mentally ill throughout his reign, and his functions were carried out by the following prince regents: Prince Regent from 1912 until 1913, then King of Bavaria, he lost his throne in the German Revolution at the end of World War I. Franz Bonaventura Adalbert Maria Herzog von Bayern (born 14 July 1933), styled His Royal Highness The Duke of Bavaria, is head of the Wittelsbach family, the former ruling family of the Kingdom of Bavaria.