Moses commanded, "Do not mistreat an alien or oppress him, for you were aliens in Egypt." [Exo. 22:21] The Bible is unabashedly pro-immigrant. The argument is simple: You were immigrants in Egypt, and you didn't like being mistreated, so now that you have your own country, you should treat immigrants compassionately. Compassionate treatment of immigrants is basically an early version of the Golden Rule [Luke 6:31]: Treat people the way you used to want to be treated when you were in Egypt.
The Exodus was an act of protection against mistreated immigrants. The children of Israel had earlier crossed the border of Egypt to seek a more economically secure life for themselves. Eventually they were seen as a threat to Egyptian cultural purity and national security. Much later, King David surrounded himself with immigrants, as did his son, Solomon. The prophets spoke out on behalf of aliens frequently.
Jesus of Nazareth was an immigrant. When he was a child, he and Mary and Joseph crossed the border to Egypt illegally [Matt. 2:13-15]. They had a well-founded fear of political persecution from a Middle Eastern dictator named Herod.
- Jerry Bowyer, “Forum: The Bible is unabashedly pro-immigrant,” at http://www.post-gazette.com/pg/06176/700765-109.stm