Genesis 38:9
Genesis 38:9 AMP
Onan knew that the child (heir) would not be his [but his dead brother’s]; so whenever he lay with his brother’s widow, he spilled his seed on the ground [to prevent conception], so that he would not give a child to his brother.