
In Genesis 38, a story interrupts the Toledot of Jacob (Gen 37:2). However, what looks like an interruption (and a strange one at that) plays an important part in the story of Jacob. In this story, Judah marries the daughter of a Canaanite named Shua, and they have three sons: Er, Onan, and Shelah (38:2–5). Given the importance of not marrying Canaanites for Abraham, Isaac, and Jacob, the story opens with a hint that something is not right.
That hunch is confirmed when Judah marries his son Er to a woman named Tamar. We soon learn that Er was an evil man, and “the Lord put him to death” (Gen 38:7). His brother apparently was no better, since his duty was to marry Tamar and allow their firstborn son to be the legal son of Er. This was called Levirate marriage, and it ensured that clans would have persistent inheritance and would endure.
But Onan, the brother of Er, fails in his duty. Genesis 38:8–9 explains:
Then Judah said to Onan, “Go in to your brother’s wife, and perform the duty of a brother-in-law to her, and raise up offspring for your brother.” But Onan knew that the offspring would not be his; so when he went in to his brother’s wife he spilled the semen on the ground, lest he should give offspring to his brother.
And as a consequence, “what he did was displeasing in the sight of the Lord, and he slew him also” (Gen 38:10).
This left the final son Shelah to fulfill his duty and marry Tamar. However, Judah promised him to Tamar, inviting her to live in his household, but decided against actually allowing the marriage, due to his fear that Shelah too would die (Gen 38:11). At this point, we have evil begetting evil, and everything seems terrible.
And the story only gets worse. Tamar, taking matters into her own hands, waits until Judah’s wife, the daughter of Shua, dies (Gen 38:12) and then poses as a cult prostitute to seduce him sexually, at a time when he was presumably grieving. She wears a veil, so that Judah does not recognize her. And he asks for sex. He offers one goat for the exchange. She agrees but as a guarantee needs something of value before sex. So he pledges his signet, cord, and staff (Gen 38:18). They have sex, and she conceives. But she keeps the whole event secret.
When Judah sends the goat, he cannot find her anywhere. So out of embarrassment, he keeps it quiet too (Gen 38:20–23). Over the next three months, it becomes obvious that Tamar is pregnant, and she is accused of infidelity. In his outrage, Judah declares, “Bring her out, and let her be burned” (Gen 38:24).
Tamar for her part says she is pregnant by the person to whom belongs this signet, cord, and staff (Gen 38:25). Judah recognizes that these are his, and he confesses, “She is more righteous than I, inasmuch as I did not give her to my son Shelah” (Gen 38:26). And after this confession, Tamar bears Judah twins: Perez and Zerah.
Why Is This Story Here?
So why is this story here, in a section dedicated to Jacob’s son Joseph? First, vital to the narrative is Judah’s repentance: “She is more righteous than I, inasmuch as I did not give her to my son Shelah” (Gen 38:26). This will be important because Judah shows himself to be righteous in the Joseph story. More on this in a moment.
Second, Judah contrasts with Joseph in important ways. In Genesis 37, Judah suggests that the brothers should sell Joseph into slavery (37:26–27). Joseph obviously is sold into slavery. And while Joseph ascends to rule in Egypt, he resists sexual temptation. Judah gives in to sexual temptation.
Third, the language of Genesis 38 ties the chapter to the Joseph story. The brothers send Joseph’s bloodied robe to their father and ask him to identify it (הַכֶּר־נָא), and Jacob recognizes it (Gen 37:32–33). Tamar sends Judah his pledge with the same request to identify it (הַכֶּר־נָא), and Judah recognizes his signet, cord, and staff (Gen 38:25–26). The deceiver is deceived: the man who made his father recognize a garment must now recognize his own pledge and his own guilt.

Fourth, the repentance of Judah in Genesis 38:26 after Judah’s culpability in selling Joseph into slavery in Genesis 37:26–27 explains why Judah is willing to become a slave himself in place of his brother Benjamin in Genesis 44:18–34. Judah acts with uncommon honour. Yet he was not naturally virtuous, but needed to realize his own lack of righteousness.
Fifth, Judah is the brother who leads in public repentance for what they did to Joseph. As he says to Joseph (before he knows his identity): “How can we declare ourselves righteous (נִּצְּטַדָּק)? God has found out the sin of your servants” (Gen 44:16). As leader of repentance, in light of his earlier admission that he needed righteousness (Gen 38:26), Judah shows himself to be a healed man, ready to take the crown of leadership.
Last, Judah’s repentance will explain why he, the fourth born, receives the inheritance of a scepter and staff (i.e., rule) that his three older brothers forfeited for their various failures in Genesis 49:8–12. Judah, however, received leadership. And it would be through his line, even though Perez was born of an incestuous relationship with Tamar, that both David and eventually Jesus would be born (Ruth 4:18–22). Matthew even names Tamar in the genealogy of Christ (Matt 1:3).
The reason why this story appears in Genesis is to show how Judah moved from selling Joseph into slavery and giving in to sexual exploitation to being repentant, leading his brothers in repentance, and thereby receiving the rule and privilege of having the promised offspring come through his line.
Indeed, Abraham was justified by faith (Gen 15:6), but Judah shows that apart from God’s justice, nobody can be just before God. It takes grace, the promise of God. One additional lesson here, I think, is that God does not work through perfect people; he works through broken people who recognize their need for righteousness.



