Genesis 38:2-10 - WEB
2
Judah saw there a daughter of a certain Canaanite whose name was Shua. He took her, and went in to her.
3
She conceived, and bore a son; and he named him Er.
4
She conceived again, and bore a son; and she named him Onan.
5
She yet again bore a son, and named him Shelah: and he was at Chezib, when she bore him.
6
Judah took a wife for Er, his firstborn, and her name was Tamar.
7
Er, Judah`s firstborn, was wicked in the sight of Yahweh. Yahweh killed him.
8
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
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
The thing which he did was evil in the sight of Yahweh, and he killed him also.
Full Chapter