Genesis 38:9

Genesis 38:9 GNBDC

But Onan knew that the children would not belong to him, so whenever he had intercourse with his brother's widow, he let the semen spill on the ground, so that there would be no children for his brother.