 He took up his new position in January 1789, and served there only until July, when he was named viceroy of Peru and president of the Audiencia of Lima.On March 4, 1789 he was promoted to lieutenant general.In Peru he introduced administrative reforms, encouraged literature and the arts, and sent out exploring expeditions.