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 The attack was against Gelves as a bad representative of the crown and not against the monarchy or colonial rule itself. There was also a brief conspiracy in the mid-seventeenth century to unite creole elites, blacks, and indigenous against the Spanish crown and proclaim Mexican independence. The man pushing this notion called himself Don Guillén Lampart y Guzmán, an Irishman born William Lamport. Lamport's conspiracy was discovered, and he was arrested by the Inquisition in 1642, and executed fifteen years later for sedition. There is a statue of Lamport in the mausoleum at the base of the Angel of Independence