The struggle for supremacy in Italy between France and Spain was resolved in favour of the latter. Caught between the Imperial-Spanish and Turkish superpowers, the Republic adopted a skilful political strategy of quasi-neutrality in Europe, which turned into a defensive stance against the Ottomans. Venice's maritime aid was potentially useful to Spain, but not to the point of allowing it to reinforce its position in the Levant, which would increase its strength in Italy as well, where it was practically the only Italian state not subject to Spain. In the Turkish war of 1537-40, Venice was allied with the Holy Roman Emperor and King of Spain, Charles V. Andrea Doria, commander of the allied fleets, was defeated at Preveza in 1538, and two years later Venice signed a treaty of peace by which the Turks took the Aegean duchy of Naxos from the Sanudo family. After Preveza the supremacy of the sea passed to the Ottomans.