Notes on the Bible, by Albert Barnes, , at sacred-texts.com
This chapter enjoins sanctity and purity in the congregation of Israel as a whole, and lays down certain rights and duties of citizenship.
Compare Lev 21:17-24. Such persons, exhibiting a mutilation of that human nature which was made in God's image, were rejected from the covenant entirely. However, they could be proselytes (compare Act 8:27). The Old Testament itself foretells Isa 56:3-5 the removal of this ban when under the kingdom of Messiah the outward and emblematic perfection and sanctity of Israel should be fulfilled in their inner meaning by the covenanted presence and work of the Holy Spirit in the Church.
A bastard - Probably, a child born of incest or adultery.
Even to his tenth generation - i. e. (see the next verse and Neh 13:1), forever. Ten is the number of perfection and completeness.
This law forbids only the naturalization of those against whom it is directed. It does not forbid their dwelling in the land; and seems to refer rather to the nations than to individuals. It was not understood at any rate to interdict marriage with a Moabitess; compare Rut 1:4; Rut 4:13. Ruth however, and her sister were doubtless proselytes.
Compare the marginal reference. The Moabites and the Ammonites are to be regarded as clans of the same stock rather than as two independent nations, and as acting together. Compare Ch2 20:1.
i. e. "thou shalt not invite them robe on terms of amity with thee (compare Deu 20:10 ff), nor make their welfare thy care": compare Ezr 9:12. There is no injunction to hatred or retaliation (compare Deu 2:9, Deu 2:19); but later history contains frequent record of hostility between Israel and these nations.
The Edomite, as descended from Esau the twin brother of Jacob (compare Deu 2:4), and the Egyptian, as of that nation which had for long shown hospitality to Joseph and his brethren, were not to be objects of abhorrence. The oppression of the Egyptians was perhaps regarded as the act of the Pharaohs rather than the will of the people Exo 11:2-3; and at any rate was not to cancel the memory of preceding hospitality.
In their third generation - i. e. the great grandchildren of the Edomite or Egyptian alien: compare the similar phrase in Exo 20:5.
The whole passage refers not to the encampments of the nation while passing from Egypt through the wilderness, but to future warlike expeditions seat out from Canaan.
The case in question is that of a slave who fled from a pagan master to the holy land. It is of course assumed that the refugee was not flying from justice, but only from the tyranny of his lord.
Compare the marginal reference. Prostitution was a common part of religious observances among idolatrous nations, especially in the worship of Ashtoreth or Astarte. Compare Mic 1:7; Baruch 6:43.
Another Gentile practice, connected with the one alluded to in the preceding verse, is here forbidden. The word "dog" is figurative (compare Rev 22:15), and equivalent to the "sodomite" of the verse preceding.