If they immigrated much after the Civil War (sorry SnP, the "War of Yankee Aggression") They had to be literate
in English, able to provide for themselves (so as not to became a drag on the state and it's taxpayers), pay a 50¢ head tax per person and, just by the way,
not be Chinese. You know, I was expected to know all this stuff in high school history.
That was simply to get in. You actually had to know more about the country's history than most citizens bother to learn today to qualify for naturalization. I think it's still that way, at least it was in the early eighties. Most of
us probably wouldn't be able to qualify for citizenship.
The simple fact, as HomeLAN points out, is that there are legal avenues for entry and immigration. If you don't want to use them, stay the fuck out.
Edit: BTW, try to visit Mexico sometime without an entry visa.