Genesis 38
1 At that time Judah went down from his brothers. He turned aside to a man from Adullam whose name was Hirah. 2 There Judah saw the daughter of a Canaanite man whose name was Shua. He married her and slept with her. 3 She became pregnant and gave birth to a son, and he named him Er. 4 She became pregnant again and gave birth to a son, and she named him Onan. 5 She gave birth to yet another son, and she named him Shela. Judah was at Chezib when she gave birth to him. 6 Judah got a wife for Er, his firstborn son. Her name was Tamar. 7 Er, Judah's firstborn, was bad in the eyes of the LORD, and the LORD put him to death. 8 Then Judah said to Onan, "Sleep with your brother's wife and do your duty to her as her brother-in-law. Raise up offspring for your brother."
9 Onan knew that the offspring would not be his. Whenever he slept with his brother's wife, he wasted his seed on the ground. He did this so that he would not give offspring to his brother. 10 What Onan did was bad in the eyes of the LORD, and he put Onan to death too. 11 Judah said to his daughter-in-law Tamar, "Live as a widow in your father's house until my son Shela grows up." For he thought, "He might die too, like his brothers." And Tamar went and lived in her father's house. 12 Many days passed, and the daughter of Shua, Judah's wife, died. When Judah had been comforted, he went up to Timnah, to the men who were shearing his flock. His friend Hirah the Adullamite went with him. 13 Tamar was told, "Look, your father-in-law is going up to Timnah to shear his flock." 14 She took off her widow's clothes, covered herself with a veil and wrapped herself up. Then she sat down at the entrance to Enaim, which is on the road to Timnah. She did this because she saw that Shela had grown up, and she had not been given to him as his wife. 15 When Judah saw her, he thought she was a prostitute, because she had covered her face. 16 He turned aside to her by the road and said, "Come, please, let me sleep with you." For he did not know that she was his daughter-in-law. She said, "What will you give me, if you sleep with me?"
17 He said, "I will send you a young goat from the flock." She said, "If you will give me a pledge until you send it." 18 He asked, "What pledge should I give you?" She answered, "Your seal, your cord, and the staff in your hand." He gave them to her and slept with her, and she became pregnant by him. 19 Then she got up and went away. She took off her veil and put on her widow's clothes. 20 Judah sent the young goat with his friend the Adullamite, to get the pledge back from the woman. But his friend did not find her. 21 He asked the men who lived there, "Where is the consecrated woman who was at Enaim by the road?" They said, "There has been no consecrated woman here." 22 So he went back to Judah and said, "I did not find her. Also, the men who live there said, 'There has been no consecrated woman here.'" 23 Judah said, "Let her keep the things, or people will hold us in contempt. Look, I sent this young goat, and you did not find her." 24 About three months later, Judah was told, "Your daughter-in-law Tamar has prostituted herself. And now she is pregnant from it." Judah said, "Bring her out, and let her be burned!"
25 As she was being brought out, she sent word to her father-in-law: "I am pregnant by the man who owns these things." She also said, "Please look and see if you recognize them. Whose are this seal, these cords and this staff?" 26 Judah recognized them and said, "She is more just than I am, because I did not give her to my son Shela." And he did not sleep with her again. 27 When the time came for her to give birth, there were twins in her womb. 28 As she was giving birth, one of them put out a hand. The midwife took a scarlet thread and tied it on his hand. She said, "This one came out first." 29 But as he drew back his hand, his brother came out. She said, "What a breach you have burst upon yourself!" And he named him Perez. 30 After that his brother came out, the one with the scarlet thread on his hand. And he named him Zerah.