Deuteronomy 23:5-13
English Standard Version
Chapter 23
5But the Lord your God would not listen to Balaam; instead the Lord your God turned the curse into a blessing for you, because the Lord your God loved you. 6You shall not seek their peace or their prosperity all your days forever.
7"You shall not abhor an Edomite, for he is your brother. You shall not abhor an Egyptian, because you were a sojourner in his land.
8Children born to them in the third generation may enter the assembly of the Lord.