After his appointment as viceroy, he sailed from Cádiz on January 28, 1681. He arrived in Lima on November 20 of that year and received the government of the colony from Archbishop Melchor Liñán y Cisneros. He immediately set to work to put the government in order. During his administration, he issued a decree to protect the Indigenous against oppressive church taxes. He conducted a census of the Indigenous, and required them to reside in their customary locations. He also reorganized the University of San Marcos in Lima. In 1683 he reestablished the Lima mint, which had been closed since 1572. Its reopening had been opposed by mining interests in Potosí and by the mint in Seville, which wanted to continue striking coins from silver sent from Perú. The English corsair Edward Davis and other pirates appeared off the Pacific coast in 1684, beginning hostilities that lasted four years and requiring the viceroy to take costly defensive measures. In 1686 he ordered the construction of city walls in Lima and Trujillo) to defend against pirates. The planning of the wall in Lima was under the direction of Cosmógrafo Real Juan Ramón Koening. Also in 1686 Spanish forces repelled an attack by Davis.
The earthquake of 1687
On October 20, 1687, an earthquake destroyed the city of Lima, killing 600 people there and 700 in Callao. Before the earthquake, Lima had been a city of straight streets, brick and adobe houses with wooden balconies, and seventy churches and bell towers. The earthquake destroyed much of this, including nearly all the churches and the city walls that were under construction. Wheat production in the area around Lima was interrupted. The viceroy and his wife took extraordinary measures to aid the victims, expending much money from their own pockets. The city was rebuilt, only to be destroyed again by the earthquake of 1746. As in the earthquake of 1655, the painting of the crucified Brown Christ on an adobe wall in the Angolan quarter of Lima survived, confirming to the faithful its miraculous nature.
Walled cities
Work began again on the wall in Lima. It was finished in 1687. It was 11,700 meters long and had a 5-meter wide esplanade along the top. There were 34 defensive bastions and five gates leading into the city. Its height was 4.5 meters, including 1.4 meters of parapets. From that time, Lima was surrounded by a strong semicircular wall. It began in the sector of Monserrate, located on the left bank of the Rímac River, then extended towards the south. After making a curve, the wall advanced to the north, finishing in the district of Maravillas, where it returned to the river. Protection of the northern side of Lima was entrusted to the volume of the Rímac River. The oval wall protecting Trujillo, also of adobe, was built between 1685 and 1687. Trujillo became the third walled city of America, after Cartagena de Indias and Callao. Viceroy Navarra prohibited the eating of Solanum muricatum, a food plant cultivated in Peru from before the time of the Spanish arrival. It was known as pepino by the Spanish, although it was not a cucumber. This vegetable was thought to cause death if taken with liquor. The viceroy referred to it as mataserrano.
End of his administration
Navarra's appointed successor, the Count of Cañete, died on the voyage from Acapulco to Paita. In his place was sent Melchor Portocarrero, 3rd Count of Monclova. The latter entered Lima and received the government on August 15, 1689. Viceroy Navarra sent a detailed report to Spain about his administration, dated November 18, 1689. He stayed in Lima until 1691, pending an investigation of his administration. He then sailed for Spain to occupy the presidency of the Council of Aragon, but both he and his wife, Francisca Toralto de Aragón, 2nd Duchess of Palata, in her own right, 2nd Principessa di Massalubrense, died on the journey and are buried in Portobello.