Genesis 38:1-10
Genesis 38:1-10 AMP
Now at that time, Judah left his brothers and went down to [stay with] a certain Adullamite named Hirah. There Judah saw a daughter of Shua, a Canaanite, and he took her [as his wife] and lived with her. So she conceived and gave birth to a son and Judah named him Er. Then she conceived again and gave birth to a son and named him Onan. Again she conceived and gave birth to still another son and named him Shelah. It was at Chezib that she gave birth to him. Now Judah took a wife for Er his firstborn; her name was Tamar. But Er, Judah’s firstborn, was evil in the sight of the LORD, and the LORD killed him [in judgment]. Then Judah told Onan, “Go in to your brother’s widow, and perform your duty as a brother-in-law [under the levirate marriage custom]; [be her husband and] raise children for [the name of] your brother.” [Deut 25:5-10] 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. But what he did was displeasing in the sight of the LORD; therefore He killed him also [in judgment].