He organized a squadron to fight in the War with Brazil (1825-1828), but it was used in the Argentine civil war, early on participating in the Battle of Rincon de Valladares. He fought in the army of the governor of Tucumán, Javier López, in the Battle of La Tablada against Facundo Quiroga, and in the subsequent campaign in Catamarca Province. There he organized the provincial army and commanded it in a campaign against La Rioja Province, which failed due to poor organization of his forces. He returned to take part in actions in La Rioja, and was taken prisoner in 1831.