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.
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.
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.
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).
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.
During his reign, the controversy surrounding the Lord of Miracles reached a point where the authorities, both Spanish and Catholic, decided to remove the image, as it was seen in a negative light by the local government at the time.