Once in Buenos Aires, Castelli found himself in political isolation. The triumvirate and the newspaper "La Gazeta" blamed him for the defeat at Huaqui, and sought punishment as a deterrent. His former supporters were divided between those who supported the ideas of the Triumvirate and those no longer able to help. Castelli suffered from tongue cancer during the long trial, which made it progressively more difficult for him to speak. He died on 12 October 1812, while the trial was still underway.