1Around that time, Judah left his brothers and went to stay with a man named Hirah from Adullam.
2There, Judah saw the daughter of a Canaanite man named Shua. He married her and had sexual relations with her.
3She became pregnant and gave birth to a son, whom Judah named Er.
4She became pregnant again and gave birth to another son, and she named him Onan.
5She gave birth to a third son, and named him Shelah. She was in Chezib when he was born.
6Judah arranged for his firstborn son, Er, to marry a woman named Tamar.
7Er, Judah’s firstborn, did evil things in Yahweh’s sight, so Yahweh took his life.
8Then Judah told Onan, “Go to your brother’s wife, fulfill your duty as a brother-in-law, and produce children for your brother.”
9Onan knew that the children wouldn't be considered his own. So whenever he had sexual relations with his brother’s wife, he spilled his semen on the ground, to avoid providing offspring for his brother.
10What he did displeased Yahweh, so Yahweh took his life as well.
11Then Judah told his daughter-in-law Tamar, “Remain a widow in your father’s house until my son Shelah grows up.” He said this because he was afraid Shelah might also die, like his brothers. So Tamar went and lived in her father’s house.
12After a long time, Judah’s wife, Shua’s daughter, died. When Judah had been comforted, he went up to Timnah to his sheep shearers, along with his friend Hirah, the Adullamite.
13Someone told Tamar, “Look, your father-in-law is going up to Timnah to shear his sheep.”
14So she took off her widow’s clothes, covered herself with a veil, disguised herself, and sat at the entrance of Enaim, which is on the road to Timnah. She did this because she saw that Shelah had grown up, but she had not been given to him in marriage.
15When Judah saw her, he thought she was a prostitute because she had covered her face.
16He turned off the road to go to her and said, “Please, let me sleep with you.” He didn't know she was his daughter-in-law. She asked, “What will you give me to sleep with me?”
17He said, “I will send you a young goat from my flock.” She replied, “Will you give me something as a guarantee until you send it?”
18He asked, “What kind of guarantee should I give you?” She said, “Your signet ring, your cord, and the staff you are holding.” He gave them to her, then had sexual relations with her, and she became pregnant by him.
19She then got up and left. She took off her veil and put her widow’s clothes back on.
20Judah sent his friend, the Adullamite, with the young goat to retrieve the guarantee from the woman, but his friend couldn't find her.
21Then he asked the men of that place, "Where is the prostitute who was at Enaim by the road?" They replied, "There has been no prostitute here."
22He went back to Judah and said, "I couldn't find her; and the men of the place also told me, 'There has been no prostitute here.'"
23Judah said, "Let her keep it, or we will be shamed. Look, I sent this young goat, but you didn't find her."
24About three months later, Judah was told, "Your daughter-in-law Tamar has acted like a prostitute. What's more, she is pregnant because of it." Judah said, "Bring her out and burn her to death!"
25As she was being brought out, she sent a message to her father-in-law that said, "The man who owns these items is the father of my child." She also said, "Please look closely and see whose these are—the seal, the cord, and the staff."
26Judah recognized them and said, "She is more in the right than I am, because I didn't give her to my son Shelah." He did not have sexual relations with her again.
27When it was time for her to give birth, she was having twins.
28As she was giving birth, one baby put out a hand, and the midwife tied a scarlet thread on his hand, saying, "This one came out first."
29But then he pulled his hand back, and his brother was born first. The midwife said, "What a breakthrough you have made for yourself!" So he was named Perez.
30Afterward, his brother, who had the scarlet thread on his hand, was born, and he was named Zerah.