Deuteronomy 23:7

Amplified Bible (AMP)
“You shall not detest an Edomite, for he is your brother [Esau’s descendant]. You shall not detest an Egyptian, because you were a stranger (resident alien, foreigner) in his land.

Read Deuteronomy 23:7 in other translations