“And Jacob dwelt in the Land wherein his father dwelt, in the Land of Canaan.” (Genesis 37:1)

Our parashah begins with Jacob finally settling down to what he surely hoped would be a peaceful life in Canaan.

He had already endured a stormy childhood, having to guard himself constantly.

He had already endured a stormy childhood, having to guard himself constantly from his devious brother Esau and his murderous hatred, a 20-year exile with his even more devious uncle Laban, and the rape of his daughter Dinah when he finally returned home.

In the second verse of our parashah, “the 17-year-old Joseph was tending the flock with his brothers, and he - the youth - was with the sons of Bilhah and the sons of Zilpah, his father’s wives. And Joseph would bring evil reports about them to his father. And Israel loved Joseph the most of all his sons, because he was the son born to him in his old age.” (Genesis 37:2-3)

This reads like the description of the normal rough-and-tumble of a large family. No one could have foreseen that by the end of the parashah, just 112 verses later, ten of the brothers would have plotted murder against Joseph, but would instead have sold him into slavery; and that Joseph, after spending just one year in slavery, would be framed and thrown into prison, where he would spend the next 12 years (following Seder Olam). The parashah concludes with Joseph having completed ten years in prison, not knowing that he still had another two years to go before being released.

And in the midst of this horrendous tale of brotherly envy and hatred, the Torah inserts an aside. In Chapter 38, the first-born, Judah, left his brothers and built up a family under circumstances that were both tragic and highly morally questionable, to say the least. He married the daughter of a Canaanite, in direct violation of what Abraham (24:3) and Isaac (28:1) had decreed for their sons.

Although, in fairness, the Talmud [Pesachim 50b], Targum Onkelos, Targum Yonatan, Rashi, Ramban, Rashbam, Radak, the Ohr HaChayyim, and Metzudat Zion all render c’na’ani in this verse as “merchant” rather than “Canaanite”. Nevertheless, Sa’adiyah Gaon says that the word c’na’ani is to be understood literally as “Canaanite”; Ibn Ezra quotes the opinion that Judah’s wife was the daughter of a merchant, but adds that “it might follow the simple meaning” - i.e., that she was a Canaanite - which seems to be his understanding in his commentary to Genesis 46:10.

Judah’s first-born son, Er, married Tamar and died childless. His second son, Onan, married Tamar in levirate marriage, but refused to father any children, so he, too, died childless. Tamar, yearning to be part of this holy Hebrew family, disguised herself as a harlot, seduced Judah, and gave birth to twin boys, Peretz (“breach” or “burst forth”) and Zerah (“brightness” or “shine forth”). Obviously, this is highly questionable behaviour on Judah’s part; and yet, Peretz - the result of this union - was the ancestor of King David (Ruth 4:18-21, I Chronicles 2:3-15), who in turn is the ancestor of Mashiach.

This leads us to two questions: First, how could the Mashiach be the product of such a problematic union? Surely his ancestry has to be unblemished. And second, why does the Torah insert this episode in this juncture of the narrative, when it is clearly not in the appropriate chronological order? (To clarify, it is clear that the whole Judah-Tamar episode lasted a couple of decades, while Joseph was taken in chains to Egypt and sold into slavery immediately, to which narrative the Torah returns after the birth of Peretz and Zerah.)

The answer to the first question is based primarily on the teachings of the Vilna Gaon and Rabbi Avraham Yitzhak Kook, z.tz.l.: the Redemption has to come into the world from unexpected sources. The Satan - the adversary whose purpose is to prevent the Redemption from coming into the world - will fight to frustrate holiness and purity. Hence, in Kabbalistic terminology, the supernal Light of Redemption has to be concealed within the klipot (“shells”) of impurity. This is the only way that Redemption can come down into this physical world.

After all, the other genealogical line of King David is no less problematic: his great-grandmother was Ruth, the Moabitess who converted into Judaism. Now, “an Ammonite and a Moabite shall not enter into HaShem’s congregation [i.e., convert into Judaism] - even the tenth generation; they can never enter HaShem’s congregation ever.” (Deuteronomy 23:4) When Boaz accepted Ruth as a convert and married her (Ruth 4:10), he was doing

How could the Mashiach be the product of such a problematic union?

something highly controversial. He argued that the Torah prohibition applied to a Moabite, not a Moabitess (see Yevamot 76b, Ketuvot 7b; Ruth Rabbah 2:9 et al) - a hairsbreadth of halachic sophistry. So controversial was Boaz’s decision that it would not become accepted as mainstream halachah until David was anointed and recognised as king of Israel a century later.

And what about Ruth’s ancestry? Moab was the result of the union between Lot and his older daughter (Genesis 19:36-37) - hardly the paradigm of a good Jewish family.

But this is precisely the issue: Mashiach must inevitably come into this world garbed in the impurity of the klipot - the incestuous union of Lot and his daughter, the consorting of Judah with his former daughter-in-law whom he took to be a harlot.

And this has tremendous implications for the State of Israel, conceived and founded and led by Jews who had scant connection with Torah, often those who were bitterly opposed to Torah. This final Redemption that we are living through today had to be wrought - at least in its initial stages - by secularists: the Redemption, as always, was perforce garbed in the impurity of klipot; otherwise, it could not have come into this world.

With all this in mind, we can now answer the second question: Why is this somewhat disturbing narrative of Judah and Tamar, and the birth of Peretz the ancestor of the Mashiach related here?

198 years before Joseph was sold into slavery, God had told his great-grandfather Abra[ha]m: “Know for certain that your seed will be strangers in a land that is not theirs, and they will serve them, and they will oppress them for four hundred years.” (Genesis 15:13) This prophecy hung over the entire family; every Patriarch prayed not to be one with whom this dreaded exile would begin.

But God, in orchestrating events, ensured that the exile would contain within itself the seeds of Redemption. Peretz’s great-grandson, Nahshon son of Amminadab (I Chronicles 2:5-10), was the tribal leader who leaped into the Red Sea, showing the way forward and causing the sea to split (Sotah 37a; Mekhilta DeRabbi Yishmael, B'shalach 5, et al), 232 years after Joseph was sold into slavery.

Indeed, the entire narrative of Judah and Tamar is replete with veiled references to the Redemption. The Ba’al HaTurim (Rabbi Ya’akov ben Asher, c. 1275-1343) points out several of these: when Judah saw Tamar with her face veiled, “he considered her as a harlot.” (Genesis 38:15) The word va-yach’sheveha (“and he considered her”) occurs only three times throughout the Tanach: the first time when Abraham “trusted in HaShem, va-yach’sheveha (‘and He considered it’) for him as righteousness” (Genesis 15:6), beginning the story of Jewish history. And the third time is when Hannah stood in the Tabernacle in Shiloh, praying for a son. The High Priest, Eli, saw her, “but Eli did not hear her voice, va-yach’sheveha (‘and he considered her’) a drunk woman” (I Samuel 1:13). This heralded the birth of the prophet Samuel, who would go on to anoint both King Saul (I Samuel 10:1) and King David (I Samuel 16:13, I Chronicles 11:3) - the two kings who would redeem Israel from Philistine oppression and build up Israel into a mighty kingdom.

The next word - lezona (“as a harlot”) - occurs only twice throughout the Tanach. The only other instance is in the first chapter of Isaiah: “How has the Faithful City become as a harlot!” (Isaiah 1:21) In the words of the Ba’al HaTurim: “Just as these words of disgrace eventually became glory, so too Jerusalem’s end will be glory, as it is written: ‘And I will be for her [Jerusalem] - says HaShem - an encircling wall of fire, and I will be in her midst for glory.’ (Zechariah 2:9)

When Tamar demanded that Judah deposit a pledge with her to guarantee payment, she demanded that he leave “your signet, your wrap, and your staff that is in your hand.” (Genesis 38:18) The Ba’al HaTurim notes that the word u-mat’kha (“and your staff”) occurs only twice throughout the Tanach - here, and when God commanded Moses to lead the Children of Israel in the desert: “Pass in front of the nation, and take with you some of the elders of Israel, u-mat’kha (‘and your staff’) with which you struck the River.” (Exodus 17:5) “This teaches that this staff [of Judah’s] that he gave to her was the self-same staff with which [Moses] struck the River Nile and with

God was orchestrating events such that out of this very suffering would come the eventual deliverance.

which all the miracles were performed.” (Compare Numbers Rabbah 18:23; Yalkut Shimoni, Hukat 763, Psalms 869)

And when Tamar’s son Peretz was born, “she said: Why have you burst forth to make a breach?” (Genesis 38:29) According to the Ba’al HaTurim, “this is a veiled reference to [the halachah] that a king can breach a fence to build a road, and it is forbidden to protest against him” (compare the Rambam, "Laws of Kings" 5:3).

And then the Torah returns to the narrative of Joseph, dragged down to Egypt in chains, sold into slavery, thrown into prison, and forgotten by the king’s wine steward - the one man who could have been expected to remember him. But while Jacob spent twenty-two years mourning over his son whom he was sure was dead, and while Joseph was suffering imprisonment in Egypt, God was orchestrating events such that out of this very suffering would come the eventual deliverance from Egypt; just as out of this whole sorry story of the brothers’ betrayal and Judah’s immorality would be born the Mashiach, who will one day usher in the final Redemption.