At Villa Imperial, one of the richest cities of Upper Peru, an open cabildo called on Goyeneche to withdraw from their territory. He obeyed, as he did not have the military strength to prevail. The Bishop of La Paz, Remigio La Santa y Ortega, fled with him. Castelli was received in Potosí and requesting that the locals swear allegiance to the Junta. He also requested that the royalist generals Francisco de Paula Sanz and José de Córdoba y Rojas submit to him. He made arrangements that the operation to capture Vicente Nieto should be carried out exclusively by the surviving members of the Regiment of Patricians from the mines of Potosi, who had been incorporated with honors into the Army of the North. Sanz, Nieto, and Córdoba were executed at the Plaza of Potosí. Nieto claimed that he died happy, because it was under the Spanish flag. Goyeneche and Ortega, on the other hand, were safe on royalist land. Bernardo Monteagudo, inmate at the Jail of the Court of Chuquisaca for his participation in the revolution of 1809, escaped to join the ranks of the army. Castelli, who already knew Monteagudo's background, appointed him his secretary.