Diego Fernández de Córdoba y López de las Roelas, Marquis of Guadalcázar and Count of Posadas (1578 – 6 October 1630), was Viceroy of Mexico from October 18, 1612 to March 14, 1621 and Viceroy of Peru from July 25, 1622 to January 14, 1629.
He was born in Seville. In 1598, aged 20, he was in Central Europe as an ambassador with a mandate to travel and bring back to Spain the 13- to 14-year-old orphaned bride Margaret of Austria (daughter of Archduke Charles II of Austria and Maria Anna of Bavaria), the first, and unique, wife of king Philip III of Spain, being awarded the title of marquis of Guadalcázar, in 1609.
Fernández de Córdoba was named viceroy of New Spain by King Philip III of Spain, for whom he had served as lord of the bedchamber. Early in his mandate in New Spain, he sent Captain Diego Martínez de Hurdáiz to suppress an uprising of the Tehuecos, an ethnic subgroup of the Cahuitas of Sinaloa. Martínez de Hurdáiz was successful after fighting several battles. The viceroy also founded many cities, including Lerma (1613), Córdoba (1618), and Guadalcázar (1620).
The Mexican Córdoba, in what is now Veracruz State, was founded in part to help suppress marauding bands of escaped black slaves that preyed on travelers between Veracruz and Mexico City. He also completed the Fort of San Diego in Acapulco, overlooking the Pacific Ocean.