The Ottoman Navy contended with several Holy Leagues, such as those in 1538, 1571, 1684 and 1717 (composed primarily of Habsburg Spain, the Republic of Genoa, the Republic of Venice, the Knights of St. John, the Papal States, the Grand Duchy of Tuscany and the Duchy of Savoy), for the control of the Mediterranean Sea.