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 in his home to discuss whether it was better to obey or to revolt against a tyrannical government, as he defined the Spanish colonial government in Mexico. Famed military leader Ignacio Allende was among the attendees. In 1810 Hidalgo concluded that a revolt was needed because of injustices against the poor of Mexico. By this time Hidalgo was known for his achievements at the prestigious San Nicolás Obispo school in Valladolid (now Morelia), and later service there as rector. He also became known as a top theologian. When his older brother died in 1803, Hidalgo took over as priest for