Read this passage and open each verse for the full verse feed and commentary tools.
Judah and Tamar
6In the course of time, Judah arranged for his firstborn son, Er, to marry a young woman named Tamar. 7But Er was a wicked man in the Lord’s sight, so the Lord took his life. 8Then Judah said to Er’s brother Onan, “Go and marry Tamar, as our law requires of the brother of a man who has died. You must produce an heir for your brother.”
9But Onan was not willing to have a child who would not be his own heir. So whenever he had intercourse with his brother’s wife, he spilled the semen on the ground. This prevented her from having a child who would belong to his brother. 10But the Lord considered it evil for Onan to deny a child to his dead brother. So the Lord took Onan’s life, too.
Genesis 38:6-10 (NLT)