At the age of thirteen he left his school to fight against the Spaniards in the squadron that sailed to the south of Chile and participated in the Battle of Abtao, where he was promoted to guardiamarina. Then he participated in the Battle of Callao in 1866 and was then promoted to the rank of ensign.