Ferdinand Maria, Elector of Bavaria

Ferdinand Maria, Elector of Bavaria (31 October 1636 – 26 May 1679) was a Wittelsbach ruler of Bavaria and an elector (Kurfürst) of the Holy Roman Empire from 1651 to 1679.
Biography.
He was born in Munich and was the eldest son of Maximilian I, Elector of Bavaria and Maria Anna of Austria a daughter of Ferdinand II, Holy Roman Emperor. 
On 8 December 1650 he married Henriette Adelaide of Savoy, daughter of Victor Amadeus I of Savoy and Christine Marie of France. The couple had seven children. 
Still a minor he succeeded his father in 1651, his mother and his uncle Albert VI of Bavaria served as regents of Bavaria for three years. 
Ferdinand Maria was crowned on 31 October 1654. He was an absolute monarch. He allied with France. Ferdinand Maria supported the wars of the Habsburgs against the Ottoman Empire with Bavarian forces (1662-1664). During the Franco-Dutch War since 1672 Bavaria became neutral. The marriage of his eldest daughter Maria Anna and her cousin "Louis, Grand Dauphin" in 1680 cemented the alliance with France. Ferdinand Maria modernised the army and introduced the first Bavarian local government code. He made Bavaria a rich nation. 
He died in Schleissheim Palace and was succeeded by his son Maximilian II Emanuel. He is buried at the Theatiner Church.