 Munich was under the control of the Habsburg family for some years after Maximilian II Emanuel had made a pact with France in 1705 during the War of the Spanish Succession.The occupation led to bloody uprisings against the Austrian imperial troops followed by a massacre while farmers were rioting (the "Sendlinger Mordweihnacht" or Sendling's Night of Murder).The coronation of Max Emanuel's son elector Charles Albert as Emperor Charles VII in 1742 led to another Habsburg occupation.