Overview: Attitudes Toward Non-Jews
Biblical and rabbinic literature, with some exceptions, reflect a negative view of non-Jews, based on moral rather than racial or other grounds. In ancient times, before the rise of Islam and Christianity, non-Jews were presumed to be idolaters, and idolatry was associated with moral deviancy. Gentiles were disparaged not because they weren't Jewish, but because they were assumed to be morally deficient.
Nevertheless, biblical and rabbinic literature recognize the existence of righteous gentiles. In the Talmud, Rabbi Joshua proclaims that righteous gentiles have a share in the World to Come. Another talmudic remark affirms the possibility of learning from non-Jews, maintaining that if someone says there is wisdom in Edom (the rabbinic term for Rome), one should believe him.
Some attitudes and legal rulings do betray a more violent perspective--the biblical commandment to destroy the nation of Amalek is one commonly cited example. This injunction was not unprovoked; the Amalekites attacked the Israelites when they were at their weakest, on their way out of Egypt.
The commandment to destroy the Amalekites extends to the descendants of these attackers, and so ultimately could be considered genetic or racial (although later rabbinic thinkers characterized anybody particularly violent or evil to the Jews as a spiritual descendant of the Amalekites). From talmudic times on, Jewish authorities attempted to neutralize this commandment, and many Jewish commentators affirmed that, as Amalekites no longer exists, there is no longer an operational requirement to destroy them. However, even this neutralization does little to address the moral questions raised by this commandment, as it seems to suggest that it was terminated for logistical, not ethical reasons.
Perhaps the most troubling rabbinic statement about non-Jews was attributed to the 2nd-century sage Rabbi Shimon bar Yohai: "The best of the Gentiles should be killed." This sentiment, never translated into law, was stated during the particularly cruel rule of Hadrian, and is associated with a relatively minor sage (Shimon bar Yohai later became considered more significant when the medieval kabbalist Moses de Leon attributed the authorship of a key mystical work, the Zohar, to him). Nonetheless, it is an extremely strong statement appearing in rabbinic literature.