He was appointed chair of philosophy in Quito, Ecuador, then he went to Arequipa and finally Lima. He spent his final years writing "Historia del Perú y de las fundaciones que he hecho en él la Compañía de Jesús," the manuscript is in the National Archives of Lima. He died in Lima.