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.
Spanish Empire
A long period of wars followed in America from 1811 to 1829. In South America this period of wars led to the independence of Argentina (1810), Venezuela (1810), Chile (1810), Paraguay (1811) and Uruguay (1815, but subsequently ruled by Brazil until 1828). José de San Martín campaigned for independence in Chile (1818) and in Peru (1821). Further north, Simón Bolívar led forces that won independence between 1811 and 1826 for the area that became Venezuela, Colombia, Ecuador, Perú and Bolivia (then Alto Perú). In the Viceroyalty of New Spain, free-thinking secular priest, Miguel Hidalgo y Costilla, declared Mexican freedom in 1810 in the Grito de Dolores. Independence was actually won in 1821 by a royalist army officer turned insurgent, Agustín de Iturbide, in alliance with insurgent Vicente Guerrero and under the Plan of Iguala. The conservative Catholic hierarchy in New Spain supported Mexican independence largely because it found the liberal Spanish Constitution of 1812 abhorrent.