Genesis 38:1-11New American Standard Bible (NASB)
Judah and Tamar
38 And it came about at that time, that Judah [a]departed from his brothers and [b]visited a certain Adullamite, whose name was Hirah. 2 Judah saw there a daughter of a certain Canaanite whose name was Shua; and he took her and went in to her. 3 So she conceived and bore a son and he named him Er. 4 Then she conceived again and bore a son and named him Onan. 5 She bore still another son and named him Shelah; and it was at Chezib [c]that she bore him.
6 Now Judah took a wife for Er his firstborn, and her name was Tamar. 7 But Er, Judah’s firstborn, was evil in the sight of the Lord, so the Lord took his life. 8 Then Judah said to Onan, “Go in to your brother’s wife, and perform your duty as a brother-in-law to her, and raise up [d]offspring for your brother.” 9 Onan knew that the [e]offspring would not be his; so when he went in to his brother’s wife, he [f]wasted his seed on the ground in order not to give [g]offspring to his brother.10 But what he did was displeasing in the sight of the Lord; so He took his life also.11 Then Judah said to his daughter-in-law Tamar, “Remain a widow in your father’s house until my son Shelah grows up”; for he [h]thought, “I am afraid that he too may die like his brothers.” So Tamar went and lived in her father’s house.