1 About that time Judah left his brothers and went to stay with a man from Adullam whose name was Hirah.
2 There Judah met 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 named Er.
4 She became pregnant again and gave birth to another son, whom she named Onan.
5 Then she became pregnant again and gave birth to another son, whom she named Shelah. He was born at Kezib.
6 Judah chose a wife for his firstborn son Er. Her name was Tamar.
7 Er angered the LORD. So the LORD took away his life.
8 Then Judah said to Onan, "Go sleep with your brother's widow. Do your duty for her as a brother-in-law, and produce a descendant for your brother."
9 But Onan knew that the descendant wouldn't belong to him, so whenever he slept with his brother's widow, he wasted his semen on the ground to avoid giving his brother a descendant.
10 What Onan did angered the LORD so much that the LORD took away Onan's life too.
11 Then Judah said to his daughter-in-law Tamar, "Return to your father's home. Live as a widow until my son Shelah grows up." He thought that this son, too, might die like his brothers. So Tamar went to live in her father's home.
12 After a long time Judah's wife, the daughter of Shua, died. When Judah had finished mourning, he and his friend Hirah from Adullam went to Timnah where the men were shearing Judah's sheep.
13 As soon as Tamar was told that her father-in-law was on his way to Timnah to shear his sheep,
14 she took off her widow's clothes, covered her face with a veil, and disguised herself. Then she sat down at the entrance to Enaim, which is on the road to Timnah. (She did this because she realized that Shelah was grown up now, and she hadn't been given to him in marriage.)
15 When Judah saw her, he thought she was a prostitute because she had covered her face.
16 Since he didn't know she was his daughter-in-law, he approached her by the roadside and said, "Come on, let's sleep together!" She asked, "What will you pay to sleep with me?"
17 "I'll send you a young goat from the flock," he answered. She said, "First give me something as a deposit until you send it."
18 "What should I give you as a deposit?" he asked. "Your signet ring, its cord, and the shepherd's staff that's in your hand," she answered. So he gave them to her. Then he slept with her, and she became pregnant.
19 After she got up and left, she took off her veil and put her widow's clothes back on.
20 Judah sent his friend Hirah to deliver the young goat so that he could get back his deposit from the woman, but his friend couldn't find her.
21 He asked the men of that area, "Where's that prostitute who was beside the road at Enaim?" "There's no prostitute here," they answered.
22 So he went back to Judah and said, "I couldn't find her. Even the men of that area said, 'There's no prostitute here.'"
23 Then Judah said, "Let her keep what I gave her, or we'll become a laughingstock. After all, I did send her this young goat, but you couldn't find her."
24 About three months later Judah was told, "Your daughter-in-law Tamar has been acting like a prostitute. What's more, because of it she's pregnant." Judah ordered, "Bring her out to be burned."
25 As she was brought out, she sent a message to her father-in-law, "I'm pregnant by the man who owns these things. See if you recognize whose signet ring, cord, and shepherd's staff these are."
26 Judah recognized them and said, "She's not guilty. I am! She did this because I haven't given her my son Shelah." Judah never made love to her again.
27 The time came for Tamar to give birth, and she had twin boys.
28 When she was giving birth, one of them put out his hand. The midwife took a piece of red yarn, tied it on his wrist, and said, "This one came out first."
29 As he pulled back his hand, his brother was born. So she said, "Is this how you burst into the world!" He was named Perez [Bursting Into].
30 After that his brother was born with the red yarn on his hand. He was named Zerah [Sunrise].