In 1627, the direct line of the Gonzaga family came to an end with the vicious and weak Vincenzo II, and Mantua slowly declined under the new rulers, the Gonzaga-Nevers, a cadet French branch of the family. The War of the Mantuan Succession broke out, and in 1630 an Imperial army of 36,000 Landsknecht mercenaries besieged Mantua, bringing the plague with them. Ferdinand Carlo IV, an inept ruler, whose only interest was in holding parties and theatrical shows, allied with France in the War of the Spanish Succession. After the French defeat, he took refuge in Venice and carried with him a thousand pictures. At his death in 1708, the Duke of Mantua was declared deposed and his family of Gonzaga lost Mantua forever in favour of the Habsburgs of Austria.