Pedro Antonio Fernández de Castro, 10th Count of Lemos
Pedro Antonio Fernández de Castro, 10th Count of Lemos (20 October 1632 – 6 December 1672) was a Spanish nobleman who was Viceroy of Peru from 1667 until his death.
He married in Madrid, on 20 July 1664 Ana Francisca de Borja, daughter of the 8th Duke of Gandia, a wealthy widow since 1663 who had been the third wife of Enrique Pimentel.
Fernández de Castro was educated for the army. He was a court favorite when King Charles II of Spain appointed him Viceroy of Peru in 1666. The Count and Countess of Lemos (a title related to the Spanish city of Monforte de Lemos) arrived in Peru at the port of Callao on November 9, 1667. They were received by the Spanish of the colony with much pomp. The viceroy took possession of his office on November 21, 1667, in Lima.
In 1665 the rich mineowners José and Gaspar Salcedo, brothers from the province of Paucarcolla (now part of Puno region), revolted against the colonial government. The brothers had discovered the very rich Laykakota silver mines in 1657, and by this time were probably the richest men in Latin America. The Salcedo brothers, who were Andalusians having Native Peruvians as in-laws, were equal-opportunity employers; however they were seen as more favorable to their fellow Andalusians, to Castilians, Creoles and Native Peruvians than to Catalans, Galicians and Basques, and the latter groups of workers formed a rival faction which battled the mainstream faction led by the Salcedo family. Although the Royal Audiencia had attempted to subdue José Salcedo, blaming him for the riots, his forces defeated the royalist troops, and a truce was reached by which Salcedo effectively became the undisputed authority in the town. 
When Fernández de Castro, who was from Galicia, arrived in the colony, this rebellion had reached such proportions that, out of personal greed and desire to enforce colonial laws, he felt he needed to resolve it personally. He left his wife assisted by an Administrative Advisory Council as a Governess leaving for Paucarcolla on June 7, 1668, and soon suppressed the rebellion with an iron hand. He establish a court to try the rebels, and it sentenced José Salcedo and 41 others to death. These sentences were carried out. Gaspar Salcedo was banished for six years and fined 12,000 francs and costs. The viceroy also ordered the population—perhaps as many as 10,000 people—of San Luis de Alva, the settlement that had grown up around the mines, removed a short distance to the town of Puno, which he made the capital of the province. He then burned San Luis de Alva.
The sentences were appealed to Spain, where they were reversed. Gaspar Salcedo was freed and the fines were refunded. A natural son of José, also named José Salcedo, was made marqués de Villarica by King Philip V in 1703.
During this long absence from the capital, he left his wife, Ana Francisca de Borja y Doria, in charge of the government of Peru, as gobernadora, (female governor). This was an official appointment. The royal decree by which the count held the position of viceroy provided that in his absence, the government would be entrusted to his wife. She was not a figurehead; she exercised real authority and ran the business of the colony during her husband's absence, making decisions and issuing decrees. Her authority was recognized by the Audiencia of Lima. This was the first time in America that a woman exercised full viceregal authority.
In the early part of 1670 the news arrived at Lima that the famous English privateer Henry Morgan had taken Chagres and captured and sacked the city of Panama. Viceroy Fernández de Castro sent an expedition of 18 ships and nearly 3,000 troops, but it arrived in Panama too late—Morgan had already evacuated the city. Later in 1670 rumors of a foreign invasion prompted the viceroy to order all Pacific ports to be put in a thorough state of preparedness.
Viceroy Fernández de Castro died in Lima after a short illness on December 6, 1672, still in office.