Maximillian I Joseph of Bavaria
Maximillian I Joseph (27 May 1756, Mannheim - 13 October 1825, Schloss Nymphenburg) ruled Bavaria as Elector Max IV Joseph of Bavaria from 1799 until 1805, and from 1806 until his death as the first King of Bavaria. He was the son of Friedrich Michael von Zweibrücken, and father of King Ludwig I of Bavaria. He was a strong ally of Napoleon, and his daughter Augusta Amalia married Napoleon's stepson Eugene de Beauharnais.
Elector of Bavaria
Max IV Joseph became Elector of Bavaria upon the death of Elector Karl Theodor. Karl Theodor was an unpopular Elector in Bavaria, whos children were banned from achieving the Bavarian Electoral Throne. When he died, the next eldest line of the Wittelsbach family was the Zweibrücken-Birkenfeld line. Max became Elector of Bavaria in 1799.
King of Bavaria
Bavaria became a kingdom on New Year's Day, 1806, by the decree of Napoleon. As the founder of a new dynasty, Elector Maximillian IV Joseph was renamed King Max I Joseph of Bavaria.