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.
History of Mexico
After a protracted struggle (1810–21) for independence, New Spain became the sovereign nation of Mexico, with the signing of the Treaty of Córdoba. A brief period of monarchy (1821–23), called the First Mexican Empire, was followed by the founding of the Republic of Mexico, established under a federal constitution in 1824. Legal racial categories were eliminated, abolishing the system of castas. Slavery was not abolished at independence in 1821 or with the constitution in 1824, but was eliminated in 1829. Mexico continues to be constituted as a federated republic, under the Mexican Constitution of 1917.