1. About that time Judah parted from his brothers and pitched his tent near a certain Adullamite named Hirah.
2. There he met the daughter of a Canaanite named Shua, married her, and had relations with her.
3. She conceived and bore a son, whom she named Er.
4. Again she conceived and bore a son, whom she named Onan.
5. Then she bore still another son, whom she named Shelah. They were in Chezib when he was born.
6. Judah got a wife named Tamar for his first-born, Er.
7. But Er, Judah's first-born, greatly offended the LORD; so the LORD took his life.
8. Then Judah said to Onan, "Unite with your brother's widow, in fulfillment of your duty as brother-in-law, and thus preserve your brother's line."
9. Onan, however, knew that the descendants would not be counted as his; so whenever he had relations with his brother's widow, he wasted his seed on the ground, to avoid contributing offspring for his brother.
10. What he did greatly offended the LORD, and the LORD took his life too.
11. Thereupon Judah said to his daughter-in-law Tamar, "Stay as 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.
12. Years passed, and Judah's wife, the daughter of Shua, died. After Judah completed the period of mourning, he went up to Timnah for the shearing of his sheep, in company with his friend Hirah the Adullamite.
13. When Tamar was told that her father-in-law was on his way up to Timnah to shear his sheep,
14. she took off her widow's garb, veiled her face by covering herself with a shawl, and sat down at the entrance to Enaim, which is on the way to Timnah; for she was aware that, although Shelah was now grown up, she had not been given to him in marriage.
15. When Judah saw her, he mistook her for a harlot, since she had covered her face.
16. So he went over to her at the roadside, and not realizing that she was his daughter-in-law, he said, "Come, let me have intercourse with you." She replied, "What will you pay me for letting you have intercourse with me?"
17. He answered, "I will send you a kid from the flock." "Very well," she said, "provided you leave a pledge until you send it."
18. Judah asked, "What pledge am I to give to you?" She answered, "Your seal and cord, and the staff you carry." So he gave them to her and had intercourse with her, and she conceived by him.
19. When she went away, she took off her shawl and put on her widow's garb again.
20. Judah sent the kid by his friend the Adullamite to recover the pledge from the woman; but he could not find her.
21. So he asked the men of the place, "Where is the temple prostitute, the one by the roadside in Enaim?" But they answered, "There has never been a temple prostitute here."
22. He went back to Judah and told him, "I could not find her; and besides, the men of the place said there was no temple prostitute there."
23. "Let her keep the things," Judah replied; "otherwise we shall become a laughingstock. After all, I did send her the kid, even though you were unable to find her."
24. About three months later, Judah was told that his daughter-in-law Tamar had played the harlot and was then with child from her harlotry. "Bring her out," cried Judah; "she shall be burned."
25. But as they were bringing her out, she sent word to her father-in-law, "It is by the man to whom these things belong that I am with child. Please verify," she added, "whose seal and cord and whose staff these are."
26. Judah recognized them and said, "She is more in the right than I am, since I did not give her to my son Shelah." But he had no further relations with her.
27. When the time of her delivery came, she was found to have twins in her womb.
28. While she was giving birth, one infant put out his hand; and the midwife, taking a crimson thread, tied it on his hand, to note that this one came out first.
29. But as he withdrew his hand, his brother came out; and she said, "What a breach you have made for yourself!" So he was called Perez.
30. Afterward his brother came out; he was called Zerah.