independent ruler, Lodovico il Moro, requested the aid of Charles VIII of France against the other Italian states, eventually unleashing the Italian Wars. The king's cousin, Louis of Orléans, took part in the expedition and realized most of Italy was virtually defenseless. This prompted him to come back a few years later in 1500, and claim the Duchy of Milan for himself, his grandmother having been a member of the ruling Visconti family. At that time, Milan was also defended by Swiss mercenaries. After the victory of Louis's successor François I over the Swiss at the Battle of Marignan, the duchy was promised to the French king François I. When the Spanish Habsburg Emperor Charles V defeated François I at the Battle of Pavia in 1525, northern Italy, including Milan, passed to Habsburg Spain. In 1556, Charles V abdicated in favour of his son Philip II and his brother Ferdinand I. Charles's Italian possessions, including Milan, passed to Philip II and remained with the Spanish line of Habsburgs, while Ferdinand's Austrian line of Habsburgs ruled the Holy Roman Empire. The Great Plague of Milan in 1629–31, that claimed the lives of an estimated 60,000 people out of a population of 130,000, caused unprecedented devastation in the city and was effectively described by Alessandro Manzoni in his masterpiece "The Betrothed". This episode was seen by many as the symbol of Spanish bad rule and decadence and is considered one of the last outbreaks of the centuries-long pandemic of plague that began with the Black Death. In 1700, the Spanish line of Habsburgs was extinguished with the death of Charles II. After his death, the War of the Spanish Succession began in 1701 with the occupation of all Spanish possessions by French troops backing the claim of the French Philippe of Anjou to the Spanish throne. In 1706, the French were defeated in Ramillies and Turin and were forced to yield northern Italy to the Austrian Habsburgs. In 1713–1714 the Treaties of Utrecht and Rastatt formally confirmed Austrian sovereignty over most of Habsburg Spain's Italian possessions including Lombardy and its capital, Milan. Napoleon invaded Italy in 1796, and Milan was declared capital of the Cisalpine Republic. Later, he declared Milan capital of the Kingdom of Italy and was crowned King of Italy in the cathedral. Once Napoleon's occupation ended, the Congress of Vienna returned Lombardy, and Milan, to Austrian control in 1815.