4 She became pregnant again, gave birth to a son, and named him Onan.
5 Then she gave birth to one more son and named him Shelah. She was in Chezib when she gave birth to him.
6 Judah married his oldest son Er to a woman named Tamar.
7 But the Lord considered Judah’s oldest son Er immoral, and the Lord put him to death.
8 Judah said to Onan, "Go to your brother’s wife, do your duty as her brother-in-law, and provide children for your brother."
9 Onan knew the children wouldn’t be his so when he slept with his brother’s wife, he wasted his semen on the ground, so he wouldn’t give his brother children.
10 The Lord considered what he did as wrong and put him to death too.