Mexican War of Independence the night of the May 18, 1822, a mass demonstration led by the Regiment of Celaya, which Iturbide had commanded during the war, marched through the streets and demanded their commander-in-chief to accept the throne. The following day, the Congress declared Iturbide Emperor of Mexico. On October 31, 1822 Iturbide dissolved Congress and replaced it with a sympathetic junta. Despite the creation of the Mexican nation, the Spanish still managed to hold onto a port in Veracruz that Mexico did not get control of until 23 November 1825. On 28 December 1836, Spain recognized the independence of Mexico under the
Antonio López de Santa Anna enough to send him to school. In June 1810, the 16-year-old Santa Anna joined the Fijo de Veracruz infantry regiment as a cadet against the wishes of his parents, who wanted him to pursue a career in commerce. In September 1810, secular cleric Miguel Hidalgo y Costilla rebelled against Spanish rule, sparking a spontaneous mass movement in Mexico's rich agricultural area, the Bajío. The Mexican War of Independence was to last until 1821, and Santa Anna, like most creole military men, fought for the crown against the mixed-raced insurgents for independence. Santa Anna's commanding officer was José Joaquín de Arredondo,