The wars with the Republic of Venice began in 1463. A favorable peace treaty was signed in 1479 after the lengthy siege of Shkodra (1478–79). In 1480, now no longer hampered by the Venetian fleet, the Ottomans besieged Rhodes and captured Otranto. War with Venice resumed from 1499 to 1503. In 1500, a Spanish–Venetian army commanded by Gonzalo de Córdoba took Kefalonia, temporarily stopping the Ottoman offensive on eastern Venetian territories. The offensive resumed after the Ottoman victory of Preveza (1538), fought between an Ottoman fleet commanded by Hayreddin Barbarossa and that of a Christian alliance assembled by Pope Paul III.