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.
Mexico–United States border
In the mid-16th century, after the discovery of silver, settlers from various countries and backgrounds began to arrive in the area. This period of sparse settlement included colonizers from different backgrounds. The area was part of New Spain, but due to the lack of population and the diverse citizenry it had, it did not seem to belong to any country. This period lasted until the early 19th century, at which point the United States bought the lands known as the Louisiana Purchase from France and began to expand steadily (militarily) westward in its pursuit of Manifest Destiny.
The border itself was not clearly defined and remained so until the Mexican colony became independent from Spain and entered a period of political instability. Mexico attempted to create a buffer zone at the border that would prevent possible invasion from the North. The Mexican government encouraged thousands of their own citizens to settle in the region that is now known as Texas and even offered inexpensive land to settlers from the United States in exchange for populating the area. The influx of people did not provide the defense that Mexico had hoped for and instead Texas declared its independence in 1836, which lasted until 1845 when the U.S. annexed it.