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
Mexican–American War could not be released from its obligations. The US was released from all obligations of Article XI five years later by Article II of the Gadsden Purchase of 1853. The 1848 Treaty of Guadalupe Hidalgo ended the war and enforced the Mexican Cession of the northern territories of Alta California and Santa Fe de Nuevo México to the United States. Mexico acknowledged the loss of what became the State of Texas and accepted the Rio Grande as its northern border with the U.S. The losses amounted to one-third of its original territory from its 1821 independence. Before the secession of