“When a foreigner resides among you in your land, do not mistreat them. The foreigner residing among you must be treated as your native-born. Love them as yourself, for you were foreigners in Egypt. I am the Lord your God” (Leviticus 19:33,34).
Much of what God reveals to us early in the Bible is the making of a chosen people. He preserved the line of Adam-Abraham-Isaac-Jacob-Judah-David-Joseph and Mary to bring us Jesus. He favored their race and set them apart from all the others. He told them to avoid the others and made their culture and religion so odd the others would want to avoid them. There are tough stories in the Bible of segregation, exile, and regulating ethnic groups.
But God was also God of the others. He never sanctioned or promoted xenophobia (fear or hatred of strangers) among his people. He expected tolerance within their community so they would have an inkling where the story was headed and humbly realize they weren’t so exceptional after all. They had experienced the hardships of being socially and politically out of favor. They had a history of being the underclass. The only thing that distinguished them from the others was God’s favor, not their favorability. This was grace they received because God was in the process of reconciling the world to himself through Jesus Christ.
Ours is a world where all have fallen short. And the most gospel-leaning way to live is to love all of your neighbors as you love yourself and those like you.