Mexican War of Independence
Iturbide's assignment to the Oaxaca expedition coincided with a successful military coup in Spain against the monarchy of Ferdinand VII. The coup leaders, part of an expeditionary force assembled to suppress the independence movements in the Americas, had turned against the monarchy. They compelled the reluctant Ferdinand to reinstate the liberal Spanish Constitution of 1812 that created a constitutional monarchy. When news of the liberal charter reached Mexico, Iturbide perceived it both as a threat to the status quo and a catalyst to rouse the criollos to gain control of Mexico. Independence was achieved when conservative Royalist forces in the colonies chose to rise up against the liberal regime in Spain; it was an about-face compared to their previous opposition to the peasant insurgency. After an initial clash with Guerrero's forces, Iturbide assumed command of the royal army. At Iguala, he allied his formerly royalist force with Guerrero’s radical insurgents to discuss the renewed struggle for independence.
Presidency of James K. Polk
The United States had been the first country to recognize Mexico's independence following the Mexican War of Independence, but relations between the two countries began to sour in the 1830s. In the 1830s and 1840s, the United States, like France and Britain, sought a reparations treaty with Mexico for various acts committed by Mexican citizens and authorities, including the seizure of American ships. Though the United States and Mexico had agreed to a joint board to settle the various claims prior to Polk's presidency, many Americans accused the Mexican government of acting in bad faith in settling the claims. For its part, Mexico believed that the United States sought to acquire Mexican territory, and believed that many Americans filed specious or exaggerated claims. The already-troubled Mexico–United States relations were further inflamed by the possibility of the annexation of Texas, as Mexico still viewed Texas as an integral part of their republic. Additionally, Texas laid claim to all land north of the Rio Grande River, while Mexico argued that the more northern Nueces River was the proper Texan border. Though the United States had a population more than twice as numerous and an economy thirteen times greater than that of Mexico, Mexico was not prepared to give up its claim to Texas, even if it meant war.