After Joseph was sold into slavery, and prior to his being sold to Potiphar, Genesis interrupts the flow of the story and inserts this interesting, and seemingly-out-of-place, interlude about Joseph’s brother Judah:
Judah had gotten married and had three sons: Er, Onan, and Shelah. When Er came of age, Judah found him a wife named Tamar. But Er was evil (we are not told why), and God took him. After Er died, the tradition of the times was that his brother must marry the widow, and the children of this marriage would be considered the children of the dead elder brother and would continue his line. So Judah had Onan marry Tamar. But Onan wasn’t interested in supporting a family that was not considered his own, so when he slept with Tamar he would not ejaculate inside her. This displeased the Lord who had commanded his people to ‘be fruitful and multiply’, and Onan, too, was taken. Next, Shelah was supposed to marry Tamar, but Shelah was still a boy. So Judah told Tamar to return to her own father, and when Shelah was grown up they would be married.
Shelah grew to manhood, but Judah didn’t contact Tamar. She seemed a bit of a jinx, and we can understand that he didn’t want to lose his only remaining son.
Long after, Judah’s wife passed away. After the period of mourning, he took a trip to Timnah, and Tamar heard that he was going there. She also knew that Judah hadn’t done what he promised, for Shelah was obviously now a fully grown man. Since it was her sacred duty to be ‘fruitful’ and bear children, and she was considered betrothed to the family of Judah and could not marry anyone else, she devised a clever plan:
She took off her widow’s garb, covered her face, and sat by the road to Timnah. When Judah saw her, he didn’t recognize her and thought that she was a harlot, and he asked to sleep with her. She asked what he would pay. He offered a young sheep. She agreed, but since he didn’t have the sheep with him, and was only promising to send it later, she asked for some collateral. Judah gave her his seal, cord and staff. They then slept together and she conceived. He later sent a friend to give her the sheep and retrieve his belongings, but she was nowhere to be found and no one in the region had seen any harlots.
Some months later, Judah received word that Tamar was pregnant. Since she was betrothed to his family, and Shelah hadn’t married her, Tamar was evidently guilty of adultery, a capital offense. So Judah ordered her executed. As she was being brought out, she sent a package and a message to her father-in-law: “I am with child by the man to whom these belong. Examine them: whose seal and cord and staff are these?” Judah recognized them and said “She is more righteous than I, inasmuch as I did not give her to my son Shelah.”
This public confession of wrongdoing is the first such confession in the Bible (long overdue since Adam first blamed Eve and Eve blamed the Serpent), and it is a symbol of profound repentance. Tamar was spared. Thanks to her, Judah has learned to bear responsibility and to be merciful. Later on, this character preparation will serve him well when he has to confront his brother Joseph. There, as the story of the soul’s descent into material life comes to an end, Judah will have to prove to Joseph that he has become a Tzadik, a righteous man: and thanks to Tamar, he is.
Judah will then exemplify the highest form of human love, without which life on earth could never succeed – the willingness to sacrifice one’s life for another.
This is the final step in the soul’s preparation for earthly life.
Of course, after long years in a material body, the soul will become enthralled with the things of the earth, will forget from whence it came, will fall under the thumb of the ego [“Pharaoh”[, and will descend into slavery.
Tamar is greatly honored. She gave birth to twins, Perez and Zerah. King David would later be a descendant of Perez, and so too would be the Messiah.
(from my book, “The Sacred Chalice: Women of the Bible”)