Although the casualties of the Army of the North were not substantial, it was left demoralized and disbanded. The inhabitants of Upper Peru left them and welcomed the royalists back, so the army had to quickly leave those provinces. However, the resistance of Cochabamba prevented the royalists from proceeding to Buenos Aires. Castelli moved to the post of Quirbe, and received orders to return to Buenos Aires for trial. However, upon learning of such orders they had already been replaced by others: Castelli should be confined at Catamarca, while Saavedra himself took charge of the Army of the North. Saavedra was deposed as soon as he left Buenos Aires, and confined in San Juan. The First Triumvirate, who took government by then, required Castelli to return.