Deuteronomy 23:7-8 NIV

7 Do not despise an Edomite, for the Edomites are related to you. Do not despise an Egyptian, because you resided as foreigners in their country.

References for Deuteronomy 23:7

8 The third generation of children born to them may enter the assembly of the LORD.