He was named viceroy of New Spain on April 17, 1686 under the authority of King Charles II of Spain. Upon arriving in Veracruz, he stayed there a few days in order to gather intelligence on whether the French had established a base on the Gulf coast. (France and Spain were then at war.) He ordered two well-armed brigantines to sail the coast to a point now on the east coast of the United States to look for a French colony. (They didn't actually sail that far.)