Anna Maria Luisa was the only daughter of Cosimo III de' Medici, Grand Duke of Tuscany, and Marguerite Louise d'Orléans, a niece of Louis XIII of France. On her marriage to Elector Johann Wilhelm II, she became Electress Palatine, and, patronised a lot of musicians. As Johann Wilhelm had syphilis, the union with Anna Maria Luisa produced no children. In 1713 Cosimo III altered the Tuscan laws of succession to allow the accession of his daughter, and spent his final years canvassing the European powers to agree to recognise this statute. However, in 1735, as part of a territorial arrangement, the European powers appointed Francis Stephen of Lorraine as heir, and he duly ascended the Tuscan throne in her stead. After the death of Johann Wilhelm, Anna Maria Luisa returned to Florence, where she enjoyed the rank of first lady until the accession of her brother Gian Gastone de' Medici, who banished her to the Villa La Quiete.