The Ottomans had been extending into the western Mediterranean recently, especially with the Ottoman invasion of Otranto in Italy in 1480-81, interrupted by the death of Sultan Mehmed II.