In 1565, the Ottoman Empire had attacked the island of Malta. To defend itself, a fleet was gathered at the port of Barcelona. John had asked Philip II for permission to join the navy, but he was denied. In spite of this, John had left the court and travelled to Barcelona, but was not able to reach the fleet in time. Only a letter from his brother King Philip II made John give up his efforts to continue to rendezvous with the fleet of García Álvarez de Toledo y Osorio, 4th Marquis of Villafranca del Bierzo, then located in Italy.