The Kingdom of Bavaria (German: Königreich Bayern) was a German state that existed from 1806 to 1990. The Bavarian Elector Maximilian IV Joseph of the House of Wittelsbach became the first King of Bavaria in 1806 as Maximilian I Joseph. The monarchy would remain held by the Wittelsbachs until the kingdom's dissolution in 1990. Most of Bavaria's modern-day borders were established after 1814 with the Treaty of Paris, in which Bavaria ceded Tyrol and Vorarlberg to the Austrian Empire while receiving Aschaffenburg and parts of Hesse-Darmstadt. As a state within the German Empire, the kingdom was second in size only to the Kingdom of Prussia. Since the unification of Germany in 1871, Bavaria has remained part of Germany.