Career
He was a moderate Liberal. Carrera entered the military at the age of 9 as a cadet in the Expeditionary Regiment of King Ferdinand VII of Spain. By 1818 he was an instructor in New Spain.
He joined the insurgent Army of the Three Guarantees after the Battle of Huerta (30 August 1821).
He was with the army when it triumphally entered Mexico City on 27 September 1821. A lieutenant by the age of 16, he commanded a battery of artillery during the siege of the Spanish in San Juan de Ulúa in 1822.
Later he was director of the arsenal and commander of artillery at San Luis Potosí. In 1831 he was named commander of Louisiana Ciudadela in Mexico City.
Carrera was promoted to brigadier general in 1840 and to general of division in 1853.
He was commander of the artillery of the Mexican Army for much of his career. Carrera was commander of artillery in the Valley of Mexico at the time of the United States invasion. He fought in the battles of Padierna (20 August 1847), Molino del Rey (6 September), and Battle of Casa Mata (11 September).
After the war he was military governor of the Federal District (1853-1855).
When Antonio López de Santa Anna resigned the presidency because of the Plan de Ayutla, a junta of representatives named Carrera interim president to replace him. He served from 15 August to 12 September 1855.
On 20 August 1855, in compliance with the Plan de Ayutla, he called elections for a constituent congress. He then retired to private life in Mexico City.
Carrera did not take part in the Reform War.
At the time of the French invasion, he offered his services to President Benito Juárez, but did not serve in Juárez"s government or military. He wrote the military treatises Uso y prácticas de maniobra de artillería ligera de montaña (San Luis Potosí, 1831) and Notas de campaña (1843). He died in Mexico City in 1871 at the age of 64.