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
Solemn Act of the Declaration of Independence of Northern America Solemn Act of the Declaration of Independence of Northern America The Solemn Act of Northern America's Declaration of Independence () is the first Mexican legal historical document which established the separation of Mexico from Spanish rule. It was signed on November 6, 1813, by the deputies of the Congress of Anáhuac, organized by General José María Morelos in the city of Oaxaca in June of that same year, and later installed in the city of Chilpancingo on September 13. The document gathers some of the main political uprisings contained in "Feelings of the Nation" ("Sentimientos de la Nación"), a document