He died on 26 December 1778 in the Capuchin Convent of Córdoba (Spain), where he was staying on his way to the Spanish Court. He was buried in the Cordoba Cathedral in a sumptuous ceremony, a memorable event in the city's history.