Milan's last 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.