Genesis 38: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.