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 on September 27. Following his ouster, there were calls to commemorate Mexican independence along the lines that the United States celebrated in grand style its Independence Day on July 4. The creation of a committee of powerful men to mark independence celebrations, the "Junta Patriótica", organized celebrations of both September 16, to commemorate Hidalgo's grito and the start of the independence insurgency, and September 27, to celebrate actual political independence. During the Díaz regime (1876–1911), the president's birthday coincided with the September 15/16 celebration of independence. The largest celebrations took place and continue to do so in the capital's main