According to Michael C. Lemay (The Perennial Struggle, 2nd ed., Pearson/Prentice Hall, 2005, pp. 343-54), there were very few restrictions on immigration to the United States between 1820 and 1880. Partisan fighting between Federalists and Republicans over immigration was intense but disappeared along with the collapse of the Federalist party in 1815. (Federalist opposition to the War of 1812 was mainly responsible for their demise).
After 1880, various restrictions were imposed on immigration from Asia and, after World War I, from Europe. There were few restrictions, however, on immigration to the United States from the Western Hemisphere. The infamous National Origins Quota Act of 1924 imposed a total ban on Japanese immigration and a 150,000 quota for Europe, but it imposed no quota whatsover on people from this hemisphere.
The Immigration and Nationality Act of 1965 replaced the country quotas with hemispheric quotas: a limit of 20,000 for those resident outside of the Western Hemisphere and 120,000 for those in this hemisphere. This was the first real effort by the U.S. government to restrict interhemispheric immigration, which was nevertheless more generous than restrictions on Europeans and Asians.
For most of the history of the United States, people from Latin America were able to go back and forth across our southern border will few if any impediments and citizenship was easy to acquire. People in border states lived together more or less peacefully and the cultures of Mexico and the United States were each enriched by their interaction with each other. Peaceful and prosperous coexistence among Anglos, Latinos, and Indians was a cherished part of our nation's history and fabric in the southwest. It breaks my heart to see vicious xenophobia now animating so many Americans and their political leaders.