There are commands that leap off the page by their sheer moral power. So it is in the case of the social legislation in Mishpatim. Amid the complex laws relating to the treatment of slaves, personal injury and property, one command in particular stands out, by virtue of [a] its repetition (it appears twice in a single passage), and [b] the historical-psychological reasoning that lies behind it:

Do not ill-treat a stranger or oppress him, for you were strangers in Egypt.

Do not oppress a stranger; you yourselves know how it feels to be a stranger [literally, “you know the soul of a stranger”], because you were strangers in Egypt.

Mishpatim contains many laws of social justice – against taking advantage of a widow or orphan, for example, or taking interest on a loan to a fellow member of the covenant community, holding on to an object (a poor person’s cloak) taken as security against a loan, against bribery and injustice, and so on. The first and last of these laws, however, is the repeated command against harming a stranger. Clearly something fundamental is at stake in the Torah’s vision of a just and gracious social order.

Before asking why, let us first listen to the classic sources.

One of the questions the sages asked was about the difference between “ill-treatment” and “oppression.” “Oppression,” they concluded, meant monetary wrongdoing, taking financial advantage by robbery or overcharging. “Ill-treatment” referred to verbal abuse – reminding the stranger of his or her origins:

Just as there is overreaching in buying and selling, so there is wrong done by words . . . If a person was a son of proselytes, one must not taunt him by saying, “Remember the deeds of your ancestors,” because it is written “Do not ill-treat a stranger or oppress him.” Rabbi Johanan said in the name of Rabbi Shimon bar Yohai: verbal wrongdoing is worse than monetary wrongdoing, because of the first it is written “And you shall fear your God” but not of the second. Rabbi Eleazar said: one affects the person, the other only his money. Rabbi Samuel bar Nahmani said: for one restoration is possible, but not for the other.

This emphasis on verbal abuse is typical of the sages in their sensitivity to language as the creator or destroyer of social bonds. As Rabbi Eleazar notes, harsh or derogatory speech touches on self-image and self-respect in a way that other wrongs do not. What is more, as Rabbi Samuel bar Nahmani makes clear, financial wrongdoing can be rectified in a way that wounding speech cannot. Even after apology, the pain (and the damage to reputation) remains. A stranger, in particular, is sensitive to his or her status within society. He or she is an outsider. Strangers do not share with the native born a memory, a past, a sense of belonging. They are conscious of their vulnerability. Therefore we must be especially careful not to wound them by reminding them that they are not “one of us.”

The second thing the sages noted was the repeated emphasis on the stranger in biblical law. According to Rabbi Eliezer in the Talmud (Baba Metsia 59b) the Torah “warns against the wronging of a ger in thirty-six places; other say, in forty-six places.”

Whatever the precise number, the repetition throughout the Mosaic books is remarkable. Sometimes the stranger is mentioned along with the poor; at others, with the widow and orphan. On several occasions the Torah specifies: “You shall have the same law for the stranger as for the native-born.” Not only must the stranger not be wronged; he or she must be included in the positive welfare provisions of Israelite/Jewish society. But the law goes beyond this: the stranger must be loved:

When a stranger lives with you in your land, do not mistreat him. The stranger living with you must be treated as one of your native-born. Love him as yourself, for you were strangers in Egypt. I am the LORD your God.

This provision appears in the same chapter in Vayikra as the command, “You shall love your neighbour as yourself.” Later, in the book of Devarim, Moses makes it clear that this is the attribute of G-d himself:

For the LORD your God is God of gods and Lord of lords, the great God, mighty and awesome, who shows no partiality and accepts no bribes. He defends the cause of the fatherless and the widow, and loves the stranger, giving him food and clothing. And you are to love those who are strangers, for you yourselves were strangers in Egypt.

What is the logic of the command? The most profound commentary is that given by Nachmanides:

The correct interpretation appears to me to be that He is saying: do not wrong a stranger or oppress him, thinking as you might that none can deliver him out of your hand; for you know that you were strangers in the land of Egypt and I saw the oppression with which the Egyptian oppressed you, and I avenged your cause on them, because I behold the tears of such who are oppressed and have no comforter, and on the side of their oppressors there is power, and I deliver each one from him that is too strong for him. Likewise you shall not afflict the widow and the orphan for I will hear their cry, for all these people do not rely upon themselves but trust in Me. And in another verse he added this reason: for you know what it feels like to be a stranger, because you were strangers in the land of Egypt. That is to say, you know that every stranger feels depressed, and is always sighing and crying, and his eyes are always directed towards G-d, therefore He will have mercy upon him even as He showed mercy to you, as it is written, and the children of Israel sighed by reason of the bondage, and they cried, and their cry came up to God by reason of the bondage, meaning that He had mercy on them, not because of their merits but only on account of the bondage [and likewise He has mercy on all who are oppressed.]

According to Nachmanides the command has two dimensions. The first is the relative powerlessness of the stranger. He or she is not surrounded by family, friends, neighbours, a community of those ready to come to their defence. Therefore the Torah warns against wronging them because G-d has made himself protector of those who have no one else to protect them. This is the political dimension of the command.

The second reason, as we have already noted, is the psychological vulnerability of the stranger (we recall Moses’ own words at the birth of his first son: “I am a stranger in a strange land”). The stranger is one who lives outside the normal securities of home and belonging. He or she is, or feels, alone – and, throughout the Torah, G-d is especially sensitive to the sigh of the oppressed, the feelings of the rejected, the cry of the unheard. That is the emotive dimension of the command.

Rabbi Hayyim ibn Attar (Ohr ha-Hayyim) adds a further fascinating insight. It may be, he says, that the very sanctity that Israelites feel as children of the covenant may lead them to look down on those who lack a similar lineage. Therefore they are commanded not to feel superior to the ger, but instead to remember the degradation their ancestors experienced in Egypt. As such, it becomes a command of humility in the face of strangers.

The term ger itself is undefined in the Torah. There are other words for stranger, namely zar and nochri, both of which have a stronger sense of “alien” or “foreigner,” a visitor from elsewhere. The word ger, by contrast, signifies one who is not an Israelite by birth but who has come to live, on a long term basis, within Israelite society. The oral tradition accordingly identified two forms of the ger: the ger tzedek, or convert (Ruth is the classic example), and the ger toshav, a “resident alien” who has chosen to live in Israel without converting to Judaism but instead agreeing to keep the seven Noahide laws mandatory on all mankind. Ger toshav legislation represents the biblical form of minority rights.

Whichever way we look at it, however, there is something striking about this almost endlessly iterated concern for the stranger – together with the historical reminder that “you yourselves were slaves in Egypt.” It is as if, in this series of laws, we were nearing the core of the mystery of Jewish existence itself. What is the Torah implying?

Concern for social justice was not unique to Israel. What we sense, however, throughout the early biblical narrative, is the lack of basic rights to which outsiders could appeal. Not by accident is the fate of Sodom and the cities of the plain sealed when they attempt to assault Lot’s two visitors. Nor can we fail to feel the risk to which Abraham and Isaac believe they are exposed when they are forced to leave home and take refuge in Egypt or the land of the Philistines. In each of the three episodes (Bereishith 12, 20, 26) they are convinced that their life is at stake; that they may be murdered so that their wives can be taken into the royal harem.

Jacob’s daughter Dina is raped and abducted when she wanders into the territory of Shechem. There are repeated implications, in the course of the Joseph story, that in Egypt, Israelites are regarded as pariahs (the word “Hebrew,” like the term hapiru found in the non-Israelite literature of the period, seems to have a strong negative connotation). One verse in particular – when the brothers visit Joseph a second time – indicates the distaste with which they were regarded:

They served him [Joseph] by himself, the brothers by themselves, and the Egyptians who ate with him by themselves, because Egyptians could not eat with Hebrews, for that is detestable to Egyptians.

So it was in the ancient world. Hatred of the foreigner is the oldest of passions, going back to tribalism and the prehistory of civilisation. The Greeks called strangers “barbarians” because of their (as it seemed to them) outlandish speech that sounded like the bleating of sheep. The Romans were equally dismissive of non-Hellenistic races. The pages of history are stained with blood spilled in the name of racial or ethnic conflict. It was precisely this to which the Enlightenment, the new “age of reason,” promised an end. It did not happen. In revolutionary France as the Rights of Man were being pronounced, in 1789, riots broke out against the Jewish community in Alsace. Hatred against English and German immigrant workers persisted throughout the nineteenth century. In 1881 in Marseilles a crowd of 10,000 went on a rampage attacking Italians and their property. Dislike of the unlike is as old as mankind.

This fact lies at the very heart of the Jewish experience. It is no coincidence that Judaism was born in two journeys away from the two greatest civilizations of the ancient world: Abraham’s from Mesopotamia, Moses’ and the Israelites’ from Pharaonic Egypt. The Torah is the world’s great protest against empires and imperialism. There are many dimensions to this protest. One is the attempt to justify social hierarchy and the absolute power of rulers in the name of religion. Another is the subordination of the mass to the state – epitomized by the vast building projects, first of Babel, then of Egypt, and the enslavement they entailed. A third is the brutality of nations in the course of war (the subject of Amos’ oracles against the nations). Undoubtedly, though, the most serious offence – for the prophets as well as the Mosaic books – was the use of power against the powerless: the widow, the orphan and, above all, the stranger.

To be a Jew is to be a stranger. It is hard to avoid the conclusion that this is why Abraham is commanded to leave land, home and father’s house; why, long before Joseph was born, Abraham was already told that his descendants would be “strangers in a land not their own”; why Moses had to suffer personal exile before assuming leadership of the people; why the Israelites underwent persecution before inheriting their own land; and why the Torah is so insistent that this experience – the retelling of the story on Pesach, along with the never-forgotten taste of the bread of affliction and the bitter herbs of slavery – should become a permanent part of their collective memory.

Enlightenment thought is marked by two great attempts to ground ethics in something other than tradition. One belonged to the Scottish enlightenment – David Hume and Adam Smith – who sought it in emotion: the natural sympathy of human beings for one another. The other was constructed by Immanuel Kant on the basis of reason. It was illogical to prescribe one ethical rule for some people and another for others. Reason is universal, argued Kant; therefore an ethic of reason would provide for universal respect (“Treat each person as an end in himself”).

Neither succeeded. Villages and townships where Jews had lived for almost a thousand years witnessed their mass murder or deportation to the extermination camps with little or no protest. Neither Kantian reason nor Humean emotion were strong enough to inoculate Europe against genocide. Centuries of (religiously inspired) hate came together with pseudo-scientific theories of race and social Darwinism (“the survival of the fittest” as Herbert Spencer put it) to relegate whole populations – above all, the Jews – to the category of the subhuman.

It is terrifying in retrospect to grasp how seriously the Torah took the phenomenon of xenophobia, hatred of the stranger. It is as if the Torah were saying with the utmost clarity: reason is insufficient. Sympathy is inadequate. Only the force of history and memory is strong enough to form a counterweight to hate.

Why should you not hate the stranger? – asks the Torah. Because you once stood where he stands now. You know the heart of the stranger because you were once a stranger in the land of Egypt. If you are human, so is he. If he is less than human, so are you. You must fight the hatred in your heart as I once fought the greatest ruler and the strongest empire in the ancient world on your behalf. I made you into the world’s archetypal strangers so that you would fight for the rights of strangers – for your own and those of others, wherever they are, whoever they are, whatever the colour of their skin or the nature of their culture, because though they are not in your image – says G-d – they are nonetheless in Mine. There is only one reply strong enough to answer the question: Why should I not hate the stranger? Because the stranger is me.