 He later became a general in the army and then president of the country.He traveled to Spain, where he joined the army to fight against Napoleon.He also worked as a secretary in the Spanish Cortes (Congress).