Mexican–American War from the war of independence (1810–1821) as a weak and divided force. Before the war with the United States, the military faced both internal and foreign challenges. The Spanish still occupied the coastal fortress of San Juan de Ulúa, and Spain did not recognize Mexico's independence, so that the new nation was at risk for invasion. In 1829, the Spanish attempted to reconquer their former colony and Antonio López de Santa Anna became a national hero defending the homeland. The army had a set of privileges ("fueros"), established in the colonial era, that gave it jurisdiction over many aspects of
Mexican War of Independence go to war happily! God wants us to finish off the Spaniards! We do not care if we die without confession! Is this not our land?" The viceroy attempted to address the apparent cause of the riot, higher maize prices that affected the urban poor. But the 1692 riot "represented class warfare that put Spanish authority at risk. Punishment was swift and brutal, and no further riots in the capital challenged the Pax Hispanica." The various indigenous rebellions in the colonial era were often to throw off crown rule, but they were not an independence movement as such. However, during