Castelli was not received well in Córdoba, where Liniers was popular, but he was in San Miguel de Tucumán. In Salta, despite the formal good reception, he had difficulty obtaining troops, mules, food, money or guns. He took the political leadership of the Expedition, displacing Hipólito Vieytes, and replaced Ocampo with Colonel Antonio González Balcarce. He was informed that Cochabamba revolted in support of the Junta, but was threatened by royalist forces from La Paz. Castelli intercepted as well a mail from Nieto to Gutiérrez de la Concha, governor of Córdoba, which was already executed for his support to Liniers. This mail mentioned a royalist army led by Goyeneche advancing over Jujuy. Balcarce, who had advanced to Potosi, was defeated by Nieto in the Battle of Cotagaita, so Castelli sent two hundred men and two cannons to strengthen his forces. With these reinforcements Balcarce achieved the victory at the Battle of Suipacha, which allowed patriots to control all of Upper Peru unopposed. One of the men sent was Martín Miguel de Güemes, who would eventually lead the "Guerra Gaucha" in Salta years later.