Spanish attempts to reconquer Mexico
Mexican independence was officially achieved on September 27, 1821, under the Treaty of Córdoba. Spain did not recognize the treaties, arguing that the viceroy Juan O'Donojú had no authority to recognize the independence of any overseas province. This situation was dangerous to the newly acquired independent status of the nation, which had not yet been recognized by any of the European powers that could support it, and the threat of Spanish reconquest was a constant worry to the leaders of the nascent regime. On May 13, 1822 decrees were issued by the government to imprison anyone who conspired against Mexico's independence.
Military history of Mexico
Yucatán had considered itself an independent nation, but during the crisis of the revolt had offered sovereignty to any nation that would aid in defeating the Indians. The Mexican government was in a rare position of being cash rich from payment by the United States under the Treaty of Guadalupe Hidalgo for the territory taken in the Mexican–American War, and accepted Yucatán's offer. Yucatán was officially reunited with Mexico on 17 August 1848. European Yucateco forces rallied, aided by fresh guns, money, and troops from Mexico, and pushed back the Maya from more than half of the state.