1 Right about then, Judah left his brothers and went to live with an Adullamite man named Hirah. 2 There Judah met the daughter of a Canaanite man named Shua. He married her, had sexual relations with her, 3 and she conceived, bore a son, and named him Er. 4 Later, she conceived again, bore another son, and named him Onan. 5 Then she bore yet another son and named him Shelah. Judah was living in Kezib when she bore him.
6 Judah found a wife for his oldest son Er. Her name was Tamar. 7 But the LORD considered Er, Judah's oldest son, to be wicked so he put him to death. 8 So Judah instructed Onan, "You are to have sexual relations with your dead brother's wife, performing the duty of a brother-in-law with her, and have offspring for your brother." 9 But Onan knew that the offspring wouldn't be his own heir, so whenever he had sexual relations with his brother's wife, he would spill his semen on the ground to avoid fathering offspring for his brother. 10 The LORD considered what Onan was doing to be evil, so he put him to death, too.
11 After this, Judah told his daughter-in-law Tamar, "Go live as a widow in your father's house until my son Shelah grows up." But he was really thinking, ""otherwise, Shelah might die like his brothers." So Tamar left and lived in her father's house.
12 Some years later, Shua's daughter (that is, Judah's wife) died. As Judah was grieving, he visited the shearers of his flock in Timnah, accompanied by his Adullamite friend Hirah. 13 "Look!" somebody reported to Tamar, "Your father-in-law is going to Timnah to shear his sheep." 14 So she took off her mourning apparel, covered herself with a shawl, and concealed her outward appearance. Then she went out and sat at the entrance of Enaim, which is on the way to Timnah, because she knew that even though Shelah had grown up, she wasn't being given to him as his wife. 15 When Judah saw her, he thought she was a prostitute, since she had concealed her face.
16 So on the way, he turned aside, approached her, and said, "Come on! Let's have some sex!" But he didn't realize that he was talking to his own daughter-in-law. "What will you give me," she asked, "in order to have sex with me?"
17 "I'll send you a young goat from the flock," he responded. But she pressed him, asking, "What security will you put up until you've sent it?"
18 Then he asked, "What pledge do you want me to give you?" 19 "Your signet ring, cord, and the staff in your hand," she suggested. So he gave them to her, had sex with her, and she became pregnant by him. Then she got up and left. Later, she took off her shawl and put on her mourning clothes.
20 Later on, Judah sent his Adullamite friend to take her a young goat, intending to retrieve what he had put up as security from the woman, but he could not find her. 21 He asked the men who lived in that area, "Where's that temple prostitute who was sitting alongside the road at Enaim?" But they replied, "There's been no temple prostitute here."
22 So he returned to Judah and said, "I haven't found her. Also, the men who are from there said, "There's been no prostitute here.'"
23 Then Judah said, "Let her have those things. Otherwise, we'll become contemptible. I sent this young goat, but you didn't find her."
24 Three months later, it was reported to Judah, "Your daughter-in-law Tamar has turned to prostitution! And look! She's pregnant because of it!" "Bring her out," Judah responded. "Let's burn her to death!"
25 While they were bringing her out, she sent this message to her father-in-law: "I am pregnant by the man to whom these things belong. Furthermore," she added, "tell me to whom this signet ring, cord, and staff belongs."
26 When Judah recognized them, he admitted, "She is more upright than I, because I never did give her my son Shelah." And he never had sex with her again.
27 Later, when it was time for Tamar to give birth, she was carrying twins in her womb! 28 While she was giving birth, one of them put out his hand, so the midwife grabbed it and tied something scarlet around his hand, observing, "This one came out first." 29 As it was, he withdrew his hand, and then his brother was born. Amazed, the midwife cried out loud, "What's this? A breach birth?" So that boy was named Perez. 30 Afterwards, his brother came out, and around his hand was the scarlet. So they named him Zerah.