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 square, the zócalo, with the pealing of the Metropolitan Cathedral of Mexico City's bells. In the 1880s, government officials attempted to move the bell that Hidalgo rang in 1810 to gather parishioners in Dolores for what became his famous "grito". Initially the pueblo's officials said the bell no longer existed, but in 1896, the bell, known as the Bell of San José, was taken to the capital. It was renamed the "Bell of Independence" and ritually rung by Díaz. It is now an integral part of Independence Day festivities. Mexican War of Independence The Mexican War of Independence () was