Since you have become a Catholic, I imagine this comes from the Popeâs recent Dilexi Te, as well as statements from his predecessor.
The Torah does allow and welcome certain types of immigration. However it does not welcome idolaters and criminals.
Welcoming the stranger who converts
Among the welcomed, the most obvious is that of the convert, which Scripture terms ger (stranger/convert) and rabbinical literature sometimes calls a ger tzedek (righteous convert) for clarity. That is the person to whom we apply the verses you quoted:
Lev. 19:33 When a stranger [ger] sojourns [yagur] with you in your land, you shall not taunt him.
34 The stranger [ger] who sojourns [hagar] with you shall be as a native from among you, and you shall love him as yourself; for you were strangers [geirim] in the land of Egypt. I am the L.rd your G.d.
In other words, one who is to âbe as a nativeâ would be someone who is subject to exactly the same laws as Jews - namely a Jewish convert.
Similar usage appears earlier, where the convert is equated to the Jew in the context of celebrating the Exodus, which is the purpose of the Paschal offering.
Exodus 12:48 And should a proselyte [ger] reside with you, he shall make a Passover sacrifice to the L.rd. All his males shall be circumcised, and then he may approach to make it, and he will be like the native of the land, but no uncircumcised male may partake of it.
49 There shall be one law for the native and for the stranger [ger] who resides in your midst.
The stranger who is a resident alien
The other type of welcomed immigrant is described variously in Scripture as a toshav (âresidentâ), a ger (âalienâ or âstrangerâ), a ger toshav or ger vâtoshav (âresident alienâ). Halachic literature distinguishes this type of immigrant from a convert by using the term ger toshav.
Sources for *toshav, ger, ger v'toshav* and *ger toshav*
Lev. 25:35 If your brother becomes destitute and his hand falters beside you, you shall support him [whether; see Rashi] a convert [ger] or a resident [vâtoshav], so that he can live with you.
This verse commands Jews to give support so that converts and resident aliens do not fall into poverty.
Lev. 25:47 If a resident non Jew [ger vâtoshav] gains wealth with you, and your brother becomes destitute with him and is sold to a resident non Jew [ger toshav] among you or to an idol of the family of a non Jew;
48 after he is sold, he shall have redemption; one of his brothers shall redeem him.
Verse 47âs construction equates ger vâ[hu ]toshav with ger toshav, showing that it is the same person (Rashi).
The proof that this type of stranger is distinct from a convert is in this verse:
Deut. 14:21 You shall not eat any carcass [nâveilah, an animal which died without kosher slaughter]. You may give it to the stranger [ger] who is in your cities, that he may eat it, or you may sell it to a foreigner [nachri]; for you are a holy people to the L.rd, your G.dâŚ
This cannot be a convert âwho shall be as a native among youâ (Lev. 19:34), since if so, he would be forbidden to eat non-kosher meat. Rather, this is a Gentile, who unlike a Jew is not bound by the prohibition against eating a nâveilah. At the same time, he has a different status from the category of nachri Gentiles, to whom we may not give a free gift of meat, but must sell the meat to. So this âstrangerâ has some special merit. What qualifies this person?
Tradition explains that this is a person who accepted the Noahide Laws. Why this must be so will be clarified next.
Rejecting dangerous immigrants
The Scriptures command us not to allow certain people to immigrate to Israel.
Exodus 23:33 They [the idolatrous nations] shall not dwell in your land, lest they cause you to sin against Me, that you will worship their gods, which will be a snare for you.
The chief danger of allowing an idolater in is that they will lead us astray. In addition, idolatry is essentially a rejection or replacement of G.dâs authority to command. For a Gentile, this would be a rejection of the Noahide Laws.
Deuternomy 7:2 And the L.rd, your G.d, will deliver them [the Canaanite nations] to you, and you shall smite them. You shall utterly destroy them; neither shall you make a covenant with them, nor be gracious to them.
Avodah Zara 20a For the verse states, ânor be gracious to them [lo tâchaneim].â [I.e.] You should not give them encampment [chanayah] on the land. [âŚ] If it is so, [that the verse meant only not to be gracious to them via praise,] the verse should have said lo tâchuneim [with a vav and u sound]! [Thus from the variant word form] one should learn two things [simultaneously: not to praise idolaters, nor to grant them residency].
Based on the above and the continuing Talmudic discussion, Rambam says that those who have not accepted the Noahide Laws are barred from dwelling in the Holy Land. Needless to say, a Gentile who violates or supports violating the prohibition on bloodshed, like a Hamas terrorist, would not be permitted to dwell in Israel.
Laws of Idolatry 10:6 When, however, the Jewish people are in power over them, it is forbidden for us to allow an idolater among us.
Even a temporary resident or a merchant who travels from place to place should not be allowed to pass through our land unless he accepts the seven universal laws commanded to Noah and his descendants, as [Exodus 23:33] states: âThey shall not dwell in your landâ â i.e., even temporarily.
Summary
In most halachic contexts, like the command to love a stranger (Lev. 19:34), Jews understand âstrangerâ to mean a convert. The Chinuch interprets âstrangerâ more broadly that we must also welcome a new neighbor or student, etc.
In some places where the âstrangerâ is not another Jew, we understand him to be a Noahide resident alien.
Yet, despite the command to love a stranger, Scripture also commands Jews not to allow immigration for those who reject the Noahide Laws, since such people would be a snare for us and cause moral destruction, leading us away from G.d (Ex. 23:33, Deut. 7:2).
To protect themselves, other nations should do likewise and only allow the qualified and loyal ones in. If a large enough number of subversive immigrants reject the basic values upon which the nationâs laws are founded, the laws will be degraded and the nation will lose its direction. A nation has no obligation to commit suicide just because outsiders come knocking at the border. And they certainly have no obligation to give special benefits to those who break in and violate their laws. If allowed in, they would be a snare for the nation.