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. 