Deuteronomy 23:7
Thou shalt not abhor an Edomite; for he is thy brother: thou shalt not abhor an Egyptian; because thou wast a stranger in his land. Thou shalt not abhor an Edomite; for he is thy brother: thou shalt not abhor an Egyptian; because thou wast a stranger in his land.
Contempt for an Edomite is forbidden because he is a brother by kinship. Hatred of an Egyptian is likewise forbidden because Israel had once lived as strangers in his land. Under the camp arrangement connected with this command, the mixed multitude that came out of Egypt with Israel was to dwell outside the quarters of the tribes. Their descendants were shut out of the congregation for a time, but the exclusion was not permanent, for the third generation might enter.