 The French were driven from Italy in late 1512, despite their victory at the Battle of Ravenna earlier that year, leaving Milan in the hands of Maximilian Sforza and his Swiss mercenaries; but the Holy League fell apart over the subject of dividing the spoils, and in 1513 Venice allied with France, agreeing to partition Lombardy between them.The French invasion of Milan in 1513 was defeated at the Battle of Novara, which was followed by a series of defeats for the French alliance; but Francis I of France defeated the Swiss at the Battle of Marignano in 1515, and the treaties of Noyon and Brussels left France and Venice in control of northern Italy.The election of Charles of Spain as Holy Roman Emperor in 1519 led to a collapse of relations between France and the Habsburgs which resulted in the Italian War of 1521, in which France and Venice were pitted against England, the Papacy, and Charles's Habsburg possessions.