 Maximilian's son, Ferdinand Maria (1651–1679), who was a minor when he succeeded, did much indeed to repair the wounds caused by the Thirty Years' War, encouraging agriculture and industries, and building or restoring numerous churches and monasteries.In 1669, moreover, he again called a meeting of the diet, which had been suspended since 1612.His constructive work, however, was largely undone by his son Maximilian II Emanuel (1679–1726), whose far-reaching ambition set him warring against the Ottoman Empire and, on the side of France, in the great struggle of the Spanish succession.