Despite the support of Malaspina, he was dismissed from the expedition before it left Callao. No reason has ever been ascertained. However, the new Viceroy of Peru, Francisco Gil de Taboada, was an acquaintance of his, so he decided to stay in Lima rather than return to Spain. Soon, he founded an art school and devoted himself to painting portraits of prominent people, as well as creating some religious works. He died there, sometime around 1821, but certainly before 1830; possibly from causes related to the Peruvian War of Independence.