Genesis 38
2 Ref Judah saw there a daughter of a certain Canaanite whose name was Shua. He took her, and went in to her.
3 Ref She conceived, and bore a son; and he named him Er.
4 Ref She conceived again, and bore a son; and she named him Onan.
5 Ref She yet again bore a son, and named him Shelah: and he was at Chezib, when she bore him.
6 Ref Judah took a wife for Er, his firstborn, and her name was Tamar.
7 Ref Er, Judah's firstborn, was wicked in the sight of Yahweh. Yahweh killed him.
8 Ref Judah said to Onan, "Go in to your brother's wife, and perform the duty of a husband's brother to her, and raise up seed to your brother."
9 Ref Onan knew that the seed wouldn't be his; and it happened, when he went in to his brother's wife, that he spilled it on the ground, lest he should give seed to his brother.
10 Ref The thing which he did was evil in the sight of Yahweh, and he killed him also.