The Italian Wars were a series of conflicts from 1494 to 1559 that involved, at various times, most of the city-states of Italy, the Papal States, the Republic of Venice, and later most of the major states of Western Europe. Milan's last independent ruler, Lodovico il Moro, called French king Charles VIII into Italy in the expectation that France might be an ally in inter-Italian wars. The future king of France, Louis of Orléans, took part in the expedition and realised Italy was virtually defenceless. 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.