He took part in the 1580 campaign in Portugal under the Duke of Alba and in 1582 was given supreme command over the Spanish troops. In 1589, as Captain General of Portugal, he successfully defended Lisbon against the attack by the English Armada, led by John Norreys and Francis Drake.