 He was part of the junta that advised King Charles II during the first year of his reign.In 1681 he was named Viceroy and captain general of Perú, extending at that time from Panamá to Chile.After his appointment as viceroy, he sailed from Cádiz on January 28, 1681.