When, during the May Revolution in May 1810, the independence of Buenos Aires was declared, and a rebel army marched against upper Peru, Nieto joined General José de Córdoba and Francisco de Paula Sanz, governor of Potosí. The campaign was short, but decisive. The rebels were at first defeated at Cotagaita on 27 October and at Tupiza on 29 October, but collected their forces, and at Suipacha on 7 November they gained a complete victory, the royalist governor and the two royalist generals being made prisoners. Soon all the provinces of upper Peru pronounced for independence, and in the next month, by order of Juan José Castelli, member of the junta gubernativa, the three Spanish chiefs were shot in Potosí.[1]