The sons of Judah: Er, and Onan, and Shelah; which three were born to him of Shua's daughter the Canaanitess. Er, Judah's firstborn, was wicked in the sight of Yahweh; and he killed him.
and he slew him; he died by the immediate hand of God, and so his brother Onan, being wicked also, Genesis 38:7.