Genesis 38 AMP
1. Now at that time, Judah left his brothers and went down to [stay with] a certain Adullamite named Hirah.
2. There Judah saw a daughter of Shua, a Canaanite, and he took her [as his wife] and lived with her.
3. So she conceived and gave birth to a son and Judah named him Er.
4. Then she conceived again and gave birth to a son and named him Onan.
5. Again she conceived and gave birth to still another son and named him Shelah. It was at Chezib that she gave birth to him.
6. Now Judah took a wife for Er his firstborn; her name was Tamar.
7. But Er, Judah’s firstborn, was evil in the sight of the Lord, and the Lord killed him [in judgment].
8. Then Judah told Onan, “Go in to your brother’s widow, and perform your duty as a brother-in-law [under the levirate marriage custom]; [be her husband and] raise children for [the name of] your brother.”
9. Onan knew that the child (heir) would not be his [but his dead brother’s]; so whenever he lay with his brother’s widow, he spilled his seed on the ground [to prevent conception], so that he would not give a child to his brother.
10. But what he did was displeasing in the sight of the Lord; therefore He killed him also [in judgment].
11. Then Judah said to Tamar, his daughter-in-law, “Remain a widow at your father’s house until Shelah my [youngest] son is grown”; [but he was deceiving her] for he thought that [if Shelah should marry her] he too might die like his brothers did. So Tamar went and lived in her father’s house.
12. But quite a while later, Judah’s wife, the daughter of Shua, died; and when the time of mourning was ended, he went up to his sheepshearers at Timnah with his friend Hirah the Adullamite.
13. Tamar was told, “Listen, your father-in-law is going up to Timnah to shear his sheep.”
14. So she removed her widow’s clothes and covered herself with a veil, and wrapped herself up [in disguise], and sat in the gateway of Enaim, which is on the road to Timnah; for she saw that Shelah had grown up, and she had not been given to him as a wife [as Judah had promised].
15. When Judah saw her, he thought she was a [temple] prostitute, for she had covered her face [as such women did].
16. He turned to her by the road, and said, “Please come, let me lie with you”; for he did not know that she was his daughter-in-law. And she said, “What will you give me, that you may lie with me?”
17. He answered, “I will send you a young goat from the flock.” And she said, “Will you give me a pledge [as a deposit] until you send it?”
18. He said, “What pledge shall I give you?” She said, “Your seal and your cord, and the staff that is in your hand.” So he gave them to her and was intimate with her, and she conceived by him.
19. Then she got up and left, and removed her veil and put on her widow’s clothing.
20. When Judah sent the young goat by his friend the Adullamite, to get his pledge [back] from the woman, he was unable to find her.
21. He asked the men of that place, “Where is the temple prostitute who was by the roadside at Enaim?” They said, “There was no prostitute here.”
22. So he returned to Judah, and said, “I cannot find her; also the local men said, ‘There was no prostitute around here.’ ”
23. Then Judah said, “Let her keep the things (pledge articles) for herself, otherwise we will be a laughingstock [searching everywhere for her]. After all, I sent this young goat, but you did not find her.”
24. About three months later Judah was told, “Tamar your daughter-in-law has played the [role of a] prostitute, and she is with child because of her immorality.” So Judah said, “Bring her out and let her be burned [to death as punishment]!”
25. While she was being brought out, she [took the things Judah had given her and] sent [them along with a message] to her father-in-law, saying, “I am with child by the man to whom these articles belong.” And she added, “Please examine [them carefully] and see [clearly] to whom these things belong, the seal and the cord and staff.”
26. Judah recognized the articles, and said, “She has been more righteous [in this matter] than I, because I did not give her to my son Shelah [as I had promised].” And Judah did not have [intimate] relations with her again.
27. Now when the time came for her to give birth, there were twins in her womb.
28. And when she was in labor, one [baby] put out his hand, and the midwife took his hand and tied a scarlet thread on it, saying, “This one was born first.”
29. But he pulled back his hand, and his brother was born first. And she said, “What a breach you have made for yourself [to be the firstborn]!” So he was named Perez (breach, break forth).
30. Afterward his brother who had the scarlet [thread] on his hand was born and was named Zerah (brightness).