1 About that time Judah left his brothers in the hill country and went to live near his friend Hirah in the town of Adullam.
2 While there he met the daughter of Shua, a Canaanite man. Judah married her,
3 and they had three sons. He named the first one Er;
4 she named the next one Onan.
5 The third one was born when Judah was in Chezib, and she named him Shelah.
6 Later, Judah chose Tamar as a wife for Er, his eldest son.
7 But Er was very evil, and the Lord took his life.
8 So Judah told Onan, “It's your duty to marry Tamar and have a child for your brother.”
9 Onan knew the child would not be his, and when he had sex with Tamar, he made sure that she would not get pregnant.
10 The Lord wasn't pleased with Onan and took his life too.
11 Judah did not want the same thing to happen to his son Shelah, and he told Tamar, “Go home to your father and live there as a widow until my son Shelah is grown up.” So Tamar went to live with her father.
12 Some years later Judah's wife died, and he mourned for her. He then went with his friend Hirah to the town of Timnah, where his sheep were being sheared.
13 Tamar found out that her father-in-law Judah was going to Timnah to shear his sheep.
14 She also realized that Shelah was now a grown man, but she had not been allowed to marry him. So she decided to dress in something other than her widow's clothes and to cover her face with a veil. After this, she sat outside the town of Enaim on the road to Timnah.
15 When Judah came along, he did not recognize her because of the veil. He thought she was a prostitute
16 and asked her to sleep with him. She asked, “What will you give me if I do?”
17 “One of my young goats,” he answered.“What will you give me to keep until you send the goat?” she asked.
18 “What do you want?” he asked in return.“The ring on that cord around your neck,” was her reply. “I also want the special walking stick you have with you.” He gave them to her, they slept together, and she became pregnant.
19 After returning home, Tamar took off the veil and dressed in her widow's clothes again.
20 Judah sent his friend Hirah to take a goat to the woman, so he could get back the ring and walking stick, but she wasn't there.
21 Hirah asked the people of Enaim, “Where is the prostitute who sat along the road outside your town?”“There's never been one here,” they answered.
22 Hirah went back and told Judah, “I couldn't find the woman, and the people of Enaim said no prostitute had ever been there.”
23 “If you couldn't find her, we'll just let her keep the things I gave her,” Judah answered. “And we'd better forget about the goat, or else we'll look like fools.”
24 About three months later someone told Judah, “Your daughter-in-law Tamar has behaved like a prostitute, and now she's pregnant!”“Drag her out of town and burn her to death!” Judah shouted.
25 As Tamar was being dragged off, she sent someone to tell her father-in-law, “The man who gave me this ring, this cord, and this walking stick is the one who got me pregnant.”
26 “Those are mine!” Judah admitted. “She's a better person than I am, because I broke my promise to let her marry my son Shelah.” After this, Judah never slept with her again.
27-28 Tamar later gave birth to twins. But before either of them was born, one of them stuck a hand out of her womb. The woman who was helping tied a red thread around the baby's hand and explained, “This one came out first.”
29 Straight away his hand went back in, and the other child was born first. The woman then said, “What an opening you've made for yourself!” So they named the baby Perez.
30 When the brother with the red thread came out, they named him Zerah.