New King James Version

Genesis 38:9 New King James Version (NKJV)

But Onan knew that the heir would not be his; and it came to pass, when he went in to his brother’s wife, that he emitted on the ground, lest he should give an heir to his brother.

Genesis 38

Genesis 38:7-13