Despite being an adversary of Olivares, he received in 1640 a military command in the War against Portugal. He had the ambition to succeed Olivares as Valido and plotted against his successor Luis de Haro.