Judah's second son, who married his brother Er's widow Tamar under the levirate custom and then refused its purpose — 'he knew that the offspring would not be his,' and so withheld it 'so as not to give offspring to his brother' (38:9). The chapter states the charge plainly and it is a property calculation: Er's death had made Onan heir, and a son credited to Er would displace him, so he took the marriage and cheated the dead man's name. ⚠️ The English word 'onanism' is a much later coinage that reads a different offence back into the verse; older Jewish and Christian commentators argued that reading at length, but it is theirs, not the text's — Genesis says what Onan withheld, and from whom.