Spain recognizes the independence of Mexico with the signing of the Santa María-Calatrava Treaty.
The Spanish attempts to reconquer Mexico (Spanish: Intentos Españoles de Reconquista de México) were an effort by the Spanish government to regain possession of its former colony of New Spain, resulting in episodes of war comprised in clashes between the newly born Mexican nation and Spain. The designation mainly covers two periods: the first attempts occurred from 1821 to 1825 and involved the defense of Mexico's territorial waters, while the second period had two stages, including the Mexican expansion plan to take the Spanish-held island of Cuba between 1826 and 1828 and the 1829 expedition of Spanish General Isidro Barradas, which landed on Mexican soil with the object of reconquering Mexican territory. Although the Spanish never regained control of the country, they damaged the fledgling Mexican economy.
The newly independent nation of Mexico was in dire straits after eleven years of fighting its War of Independence. There were no clear plans or guidelines established by the revolutionaries, and internal struggles by different factions for control of the government ensued. Mexico suffered a complete lack of funds to administer a country of over 4.5 million km2 and faced the threats of emerging internal rebellions and of invasion by Spanish forces from their base in nearby Cuba.