Deuteronomy 23:3-8 New Revised Standard Version (NRSV)
3 No Ammonite or Moabite shall be admitted to the assembly of the Lord. Even to the tenth generation, none of their descendants shall be admitted to the assembly of the Lord, 4 because they did not meet you with food and water on your journey out of Egypt, and because they hired against you Balaam son of Beor, from Pethor of Mesopotamia, to curse you. 5 (Yet the Lord your God refused to heed Balaam; the Lord your God turned the curse into a blessing for you, because the Lord your God loved you.) 6 You shall never promote their welfare or their prosperity as long as you live.
7 You shall not abhor any of the Edomites, for they are your kin. You shall not abhor any of the Egyptians, because you were an alien residing in their land. 8 The children of the third generation that are born to them may be admitted to the assembly of the Lord.