Genesis 38:8-10
Darby Translation8Then Judah said to Onan, Go in to thy brother's wife, and fulfil to her the brother-in-law's duty, and raise up seed to thy brother. 9But when Onan knew that the seed should not be his own, it came to pass when he went in to his brother's wife, that he spilled it on the ground, in order to give no seed to his brother. 10And the thing which he did was evil in the sight of Jehovah, and he slew him also.
Darby Translation (DARBY) — Public Domain