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
The military history of Mexico consists of several millennia of armed conflicts within what is now that nation's territory and includes activities of the Mexican military in peacekeeping and combat related affairs worldwide. Wars between prehispanic peoples marked the beginning of Mexico's military history, the most notable of these fought in the form of a "flower war". After the Spanish conquest of Mexico in the 16th century, indigenous tribes were defeated by Spain, thus beginning a three century era of Spanish dominance. Mexico's struggle for independence began primarily in the 19th century, and was marked by internal conflict of early rulers after defeating the Spanish in 1821. The Mexican–American War in the mid 19th century ended in the defeat of Mexican forces, and the loss of two-fifths of the national territory. In the remainder of the 19th century, a series of conflicts began in Mexico, as the War of the Reform and the defeat of the French during their intervention in Mexico marked events in that era.