Then Judah said to Er's brother Onan, "Go and sleep with your brother's widow. Fulfill your obligation to her as her husband's brother, so that your brother may have descendants."
But Onan knew that the children would not belong to him, so when he had intercourse with his brother's widow, he let the semen spill on the ground, so that there would be no children for his brother.
Then Judah said to his daughter-in-law Tamar, "Return to your father's house and remain a widow until my son Shelah grows up." He said this because he was afraid that Shelah would be killed, as his brothers had been. So Tamar went back home.
After some time Judah's wife died. When he had finished the time of mourning, he and his friend Hirah of Adullam went to Timnah, where his sheep were being sheared.
So she changed from the widow's clothes she had been wearing, covered her face with a veil, and sat down at the entrance to Enaim, a town on the road to Timnah. As she well knew, Judah's youngest son Shelah was now grown up, and yet she had not been given to him in marriage.
He went over to her at the side of the road and said, "All right, how much do you charge?" (He did not know that she was his daughter-in-law.) She said, "What will you give me?"
He answered, "I will send you a young goat from my flock." She said, "All right, if you will give me something to keep as a pledge until you send the goat."
"What shall I give you as a pledge?" he asked. She answered, "Your seal with its cord and the walking stick you are carrying." He gave them to her. Then they had intercourse, and she became pregnant.
About three months later someone told Judah, "Your daughter-in-law Tamar has been acting like a whore, and now she is pregnant." Judah ordered, "Take her out and burn her to death."
As she was being taken out, she sent word to her father-in-law: "I am pregnant by the man who owns these things. Look at them and see whose they are---this seal with its cord and this walking stick."
Judah recognized them and said, "She is in the right. I have failed in my obligation to her---I should have given her to my son Shelah in marriage." And Judah never had intercourse with her again.