Francis II, Holy Roman Emperor
Francis II (; 12 February 1768 – 2 March 1835) was the last Holy Roman Emperor, ruling from 1792 until 6 August 1806, when he dissolved the Holy Roman Empire of the German Nation after the decisive defeat at the hands of the First French Empire led by Napoleon at the Battle of Austerlitz. In 1804, he had founded the Austrian Empire and became Francis I, the first Emperor of Austria, ruling from 1804 to 1835, so later he was named the one and only "Doppelkaiser" (double emperor) in history.
For the two years between 1804 and 1806, Francis used the title and style "by the Grace of God elected Roman Emperor, ever Augustus, hereditary Emperor of Austria" and he was called the "Emperor of both the Holy Roman Empire and Austria". He was also Apostolic King of Hungary and Bohemia as Francis I. He also served as the first president of the German Confederation following its establishment in 1815.
Electorate of Bavaria
The Wittelsbach dynasty which ruled the Duchy of Bavaria was the younger branch of the family which also ruled the Electorate of the Palatinate. The head of the elder branch was one of the seven prince-electors of the Holy Roman Empire according to the Golden Bull of 1356, but Bavaria was excluded from the electoral dignity. In 1621, the Elector Palatine Frederick V was put under the imperial ban for his role in the Bohemian Revolt against Emperor Ferdinand II, and the electoral dignity and territory of the Upper Palatinate was conferred upon his loyal cousin, Duke Maximilian I of Bavaria. Although the Peace of Westphalia would create a new electoral title for Frederick V's son, with the exception of a brief period during the War of the Spanish Succession, Maximilian's descendants would continue to hold the original electoral dignity until the extinction of his line in 1777. At that point the two lines were joined in personal union until the end of the Holy Roman Empire. In 1805, after the Peace of Pressburg, the then-elector, Maximilian Joseph, raised himself to the dignity of King of Bavaria, and the Holy Roman Empire was abolished the year after.