After 1803, two groups of Americans migrated into Spanish Texas. Legal immigrants received land through grants from Mexican officials. Illegal squatters simply crossed the border and found good farmland
Looting and small insurrections in 1818 and 1819, led by Americans James Long and the pirate Jean Lafitte, alarmed the Mexican government. The Mexican army drove American settlers back across the border into Louisiana, successfully removing 20% of Texas's total non-Indian population.
Mexican authorities overlooked that its towns were dependent on the immigrant farmers it removed. After the deportation, San Antonio and east Texas faced several years of food shortages.
I find it ironic that the situation is exactly reversed today. 12 million illegal immigrants are integrated into our economy, 8 million of them as workers. Pro-immigration advocates argue that many agriculture and food processing enterprises depend heavily on these workers. Some fruit growers in California are already feeling the impact of crackdowns on illegal immigrants, unable to harvest some of their crop.
Immigration foes point to the crimes of a segment of today's immigrants, just as the Mexican government pointed to the insurrection of Long and Lafitte 190 years ago.
I don't know what to do with illegal immigrants, or whether a guest worker program makes sense. I just found the parallels from 190 years ago to be interesting.