6 Judah got a wife for Er, his firstborn, and her name was Tamar. 7 But Er, Judah's firstborn, was wicked in the LORD's sight; so the LORD put him to death. 8 Then Judah said to Onan, "Lie with your brother's wife and fulfill your duty to her as a brother-in-law to produce offspring for your brother." 9 But Onan knew that the offspring would not be his; so whenever he lay with his brother's wife, he spilled his semen on the ground to keep from producing offspring for his brother. 10 What he did was wicked in the LORD's sight; so he put him to death also.