Then Judah said to his daughter-in-law Tamar, “Remain a widow in your father’s house until my son Shelah grows up”; for he thought, “I am afraid that he too may die like his brothers.” So Tamar went and lived in her father’s house.
Now Onan knew that the child would not be his; so when he had relations with his brother’s wife, he wasted his seed on the ground so that he would not give a child to his brother.
“When brothers live together, and one of them dies and has no son, the wife of the deceased shall not be married outside the family to a strange man. Her husband’s brother shall have relations with her and take her to himself as his wife, and perform the duty of a husband’s brother to her.
Return, my daughters! Go, for I am too old to have a husband. If I said I have hope, if I were even to have a husband tonight and also give birth to sons,