Genesis 38:8-10
Genesis 38:8-10 TPT
Then Judah said to Er’s brother Onan, “Your duty is to join yourself to her. Go perform your duty as a brother-in-law and provide an heir for your brother.” Onan, however, did not want to produce a child that would not be his own rightful heir, so whenever he and Tamar had intercourse, he purposely spilled his semen onto the ground to keep her from getting pregnant and having a child that would belong to his dead brother. But what he did was wicked in YAHWEH’s sight, so he took Onan’s life also.