His early career was that of a government official and diplomat. In 1563 he gained the king's confidence as his representative at Rome. In 1568 he was appointed lieutenant-general to John of Austria during the suppression of the Morisco Revolt in the Alpujarras, and he also accompanied John during the Lepanto campaign, his function being to watch and control his nominal commander-in-chief, whose excitable temperament was distrusted by the king.