1. About that time, Judah left his brothers and went to stay with a man named Hirah in the town of Adullam.
2. There Judah met a Canaanite girl, the daughter of a man named Shua, and married her. Judah had sexual relations with her,
3. and she became pregnant and gave birth to a son, whom Judah named Er.
4. Later she gave birth to another son and named him Onan.
5. Still later she had another son and named him Shelah. She was at Kezib when this third son was born.
6. Judah chose a girl named Tamar to be the wife of his first son Er.
7. But Er, Judah's oldest son, did what the Lord said was evil, so the Lord killed him.
8. Then Judah said to Er's brother Onan, "Go and have sexual relations with your dead brother's wife. It is your duty to provide children for your brother in this way."
9. But Onan knew that the children would not belong to him, so when he was supposed to have sexual relations with Tamar he did not complete the sex act. This made it impossible for Tamar to become pregnant and for Er to have descendants.
10. The Lord was displeased by this wicked thing Onan had done, so the Lord killed Onan also.
11. Then Judah said to his daughter-in-law Tamar, "Go back to live in your father's house, and don't marry until my young son Shelah grows up." Judah was afraid that Shelah also would die like his brothers. So Tamar returned to her father's home.
12. After a long time Judah's wife, the daughter of Shua, died. After Judah had gotten over his sorrow, he went to Timnah to his men who were cutting the wool from his sheep. His friend Hirah from Adullam went with him.
13. Tamar learned that Judah, her father-in-law, was going to Timnah to cut the wool from his sheep.
14. So she took off the clothes that showed she was a widow and covered her face with a veil to hide who she was. Then she sat down by the gate of Enaim on the road to Timnah. She did this because Judah's younger son Shelah had grown up, but Judah had not made plans for her to marry him.
15. When Judah saw her, he thought she was a prostitute, because she had covered her face with a veil.
16. So Judah went to her and said, "Let me have sexual relations with you." He did not know that she was Tamar, his daughter-in-law. She asked, "What will you give me if I let you have sexual relations with me?"
17. Judah answered, "I will send you a young goat from my flock." She answered, "First give me something to keep as a deposit until you send the goat."
18. Judah asked, "What do you want me to give you as a deposit?" Tamar answered, "Give me your seal and its cord, and give me your walking stick." So Judah gave these things to her. Then Judah and Tamar had sexual relations, and Tamar became pregnant.
19. When Tamar went home, she took off the veil that covered her face and put on the clothes that showed she was a widow.
20. Judah sent his friend Hirah with the young goat to find the woman and get back his seal and the walking stick he had given her, but Hirah could not find her.
21. He asked some of the people at the town of Enaim, "Where is the prostitute who was here by the road?" They answered, "There has never been a prostitute here."
22. So he went back to Judah and said, "I could not find the woman, and the people who lived there said, 'There has never been a prostitute here.'"
23. Judah said, "Let her keep the things. I don't want people to laugh at us. I sent her the goat as I promised, but you could not find her."
24. About three months later someone told Judah, "Tamar, your daughter-in-law, is guilty of acting like a prostitute, and now she is pregnant." Then Judah said, "Bring her out and let her be burned to death."
25. When the people went to bring Tamar out, she sent a message to her father-in-law that said, "The man who owns these things has made me pregnant. Look at this seal and its cord and this walking stick, and tell me whose they are."
26. Judah recognized them and said, "She is more in the right than I. She did this because I did not give her to my son Shelah as I promised." And Judah did not have sexual relations with her again.
27. When the time came for Tamar to give birth, there were twins in her body.
28. While she was giving birth, one baby put his hand out. The nurse tied a red string on his hand and said, "This baby came out first."
29. But he pulled his hand back in, so the other baby was born first. The nurse said, "So you are able to break out first," and they named him Perez.
30. After this, the baby with the red string on his hand was born, and they named him Zerah.