Judah said to Onan, “Go in to your brother’s wife, and perform the duty of a husband’s brother to her, and raise up offspring for your brother.”
Onan knew that the offspring wouldn’t be his; and when he went in to his brother’s wife, he spilled his semen on the ground, lest he should give offspring to his brother.
The thing which he did was evil in the LORD’s sight, and he killed him also.
