Exclusion from the Congregation
The section opens by excluding certain people from the assembly, then explains the lasting exclusion of Ammonites and Moabites through their hostility in the wilderness and their attempt to curse Israel, which the LORD overturned in love.
N1o man with crushed or severed genitals may enter the assembly of the LORD. 2No one of illegitimate birth may enter the assembly of the LORD, nor may any of his descendants, even to the tenth generation. 3No Ammonite or Moabite or any of their descendants may enter the assembly of the LORD, even to the tenth generation. 4For they did not meet you with food and water on your way out of Egypt, and they hired Balaam son of Beor from Pethor in Aram-naharaim to curse you. 5Yet the LORD your God would not listen to Balaam, and the LORD your God turned the curse into a blessing for you, because the LORD your God loves you. 6You are not to seek peace or prosperity from them as long as you live.
The tone shifts with Edomites and Egyptians: Israel must not despise them, and their descendants may enter the assembly in the third generation. Kinship and remembered sojourning temper exclusion here.
7Do not despise an Edomite, for he is your brother. Do not despise an Egyptian, because you lived as a foreigner in his land. 8The third generation of children born to them may enter the assembly of the LORD.