He remained there as a professor of arithmetic and geography and, the following year, he was awarded the rank of Ensign. He joined Colonel Mariano Ignacio Prado's coup and fought at the Battle of Callao, after which he was promoted to First Lieutenant.
After becoming a professor of arithmetic and geography, he received his promotion to Ensign the following year. He then participated in Colonel Mariano Ignacio Prado's coup and fought in the Battle of Callao, leading to his advancement to First Lieutenant.