Read this passage and open each verse for the full verse feed and commentary tools.
Judah and Tamar
6Now Judah took a wife for Er his firstborn, and her name was Tamar. 7But Er, Judah’s firstborn, was evil in the sight of the Lord, so the Lord took his life. 8Then Judah said to Onan, “Have relations with your brother’s wife and perform your duty as a brother-in-law to her, and raise up a child for your brother.” 9Now 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. 10But what he did was displeasing in the sight of the Lord; so He took his life also.
Genesis 38:6-10 (NASB)