As a soldier, he distinguished himself as a lieutenant in the Battle of Tucumán (1812), then fought in the Battle of Salta (1813) and the Battle of Sipe-Sipe (1815).