Genesis.
Chapter 38.
It came about at that time that Judah left his brothers and stayed with a certain Adullamite, whose name was Hirah. 
He met there a daughter of a Canaanite man whose name was Shua. He married her and slept with her. 
She became pregnant and had a son. He was named Er. 
She became pregnant again and had a son. She called his name Onan. 
She again had a son and called his name Shelah. It was at Kezib where she gave birth to him. 
Judah found a wife for Er, his firstborn. Her name was Tamar. 
Er, Judah's firstborn, was wicked in the sight of Yahweh. Yahweh killed him. 
Judah said to Onan, “Sleep with your brother's wife. Do the duty of a brother-in-law to her, and raise up a child for your brother.” 
Onan knew that the child would not be his. Whenever he slept with his brother's wife, he spilled the semen on the ground so he would not have a child for his brother. 
What he did was evil in the sight of Yahweh. Yahweh killed him also. 
Then Judah said to Tamar, his daughter-in-law, “Remain a widow in your father's house until Shelah, my son, grows up.” For he feared, “He might also die, just like his brothers.” Tamar left and lived in her father's house. 
After a long time, Shua's daughter, the wife of Judah, died. Judah was comforted and went up to his sheepshearers at Timnah, he and his friend Hirah the Adullamite. 
Tamar was told, “Look, your father-in-law is going up to Timnah to shear his sheep.” 
She took off the clothing of her widowhood and covered herself with her veil and wrapped herself. She sat in the gate of Enaim, which is by the road to Timnah. For she saw that Shelah had grown up but she had not been given to him as a wife. 
When Judah saw her he thought that she was a prostitute because she had covered her face. 
He went to her by the road and said, “Come, please let me sleep with you”—for he did not know that she was his daughter-in-law—and she said, “What will you give me so you can sleep with me?” 
He said, “I will send you a young goat from the flock.” She said, “Will you give me a pledge until you send it?” 
He said, “What pledge can I give you?” She replied, “Your seal and cord, and the staff that is in your hand.” He gave them to her and slept with her, and she became pregnant by him. 
She got up and went away. She took off her veil and put on the clothing of her widowhood. 
Judah sent the young goat by his friend the Adullamite in order that he might receive the pledge back from the woman's hand, but he did not find her. 
Then the Adullamite asked the men of the place, “Where is the cultic prostitute who was at Enaim by the road?” They said, “There has not been a cultic prostitute here.” 
He returned to Judah and said, “I did not find her. Also, the men of the place said, 'There has not been a cultic prostitute here.'” 
Judah said, “Let her keep the things, that we not be put to shame. Indeed, I sent this young goat, but you did not find her.” 
It came about after about three months that it was told to Judah, “Tamar your daughter-in-law has committed prostitution, and indeed, she is pregnant by it.” Judah said, “Bring her here and let her be burned.” 
When she was brought out, she sent to her father-in-law a message, “By the man who owns these I am pregnant.” She said, “Determine please whose these are, the seal and cords and staff.” 
Judah recognized them and said, “She is more righteous than I am, since I did not give her as a wife to Shelah, my son.” He did not sleep with her again. 
It came about at the time for her to give birth that, behold, twins were in her womb. 
It came about as she was giving birth one put out a hand, and the midwife took a scarlet thread and tied it on his hand and said, “This one came out first.” 
But then he drew back his hand, and, behold, his brother came out first. The midwife said, “How you have broken out!” So he was named Perez. 
Then his brother came out, who had the scarlet thread upon his hand, and he was named Zerah. 
