Genesis, Chapter 38, Verse 11
Then Judah said to his daughter-in-law Tamar, “Remain a widow in your father’s house until my son Shelah grows up”—for he feared that Shelah also might die like his brothers. So Tamar went to live in her father’s house.
Judah feared the his youngest would die like his two brothers who married Tamar and failed to provide for her sending her back to her father; fearing she was cursed causing Judah’s two older son’s deaths. This sordid tale reads like a soap opera.
Tamar is first described as marrying Judah's eldest son, Er. Because of his wickedness, Er was killed by God. By way of a Levirate union, (a marriage in which the brother of a deceased man is obliged to marry his brother's widow) Judah asked his second son, Onan, to provide offspring for Tamar so that the family line might continue. Tikva Frymer-Kensky explains that this could have substantial economic repercussions, with any son born deemed the heir of the deceased Er, and able to claim the firstborn's double share of inheritance. However, if Er was childless, Onan would inherit as the oldest surviving son. Onan spills his seed out on the ground as an act of greed. His actions were deemed wicked by God and so, like his older brother, he died prematurely. At this point, Judah is portrayed as viewing Tamar to be cursed, and is therefore reluctant to give his remaining and youngest son to her. Rather, he told Tamar to wait for Shelah, his son to grow older. However, even after he grew up, Judah did not give Tamar to Shelah in marriage.
At the time Shelah grew up, Judah became a widower. After Judah mourned the death of his wife, he planned on going to Timnah to shear his sheep. Upon hearing this news, Tamar disguised herself as a prostitute and immediately went to Enaim which was en route to Judah's destination. Upon arriving at Enaim, Judah saw the woman but did not recognize her as Tamar because of the veil she wore over her face. Thinking she was a prostitute, he requested her services. Tamar's plan was to become pregnant by this ruse in order to bear a child in Judah's line, because Judah had not given her to his son Shelah. So she played the part of a prostitute and struck a deal with Judah for a goat with a security deposit of his staff, seal, and cord. When Judah was able to have a goat sent to Enaim, in order to collect his staff and seal, the woman was nowhere to be found and no one knew of any prostitute in Enaim.
Three months later, Tamar was accused of prostitution on account of her pregnancy. Upon hearing this news, Judah ordered that she be burned to death. Tamar sent the staff, seal, and cord to Judah with a message declaring that the owner of these items was the man who had made her pregnant. Upon recognizing his security deposit, Judah released Tamar from her sentence. Tamar's place in the family and Judah's posterity secured, she gives birth to twins, Perez and Zerah. Their birth is reminiscent of the birth of Rebekah's twin sons. The midwife marks Zerah's hand with a scarlet cord when it emerges from the womb first, but Perez is born first. Perez is identified in the Book of Ruth as the ancestor of King David.
Whew! To Er is human but to love is divine.