But the exceedingly foul deed of Onan, the basest of wretches, follows. Onan must have been a malicious and incorrigible scoundrel. This is a most disgraceful sin. It is far more atrocious than incest and adultery. We call it unchastity, yes a Sodomitic sin. For Onan goes in to her; that is, he lies with her and copulates, and when it comes to the point of insemination, spills the semen, lest the woman conceive. Surely at such a time the order of nature established by God in procreation should be followed. Accordingly, it was a most disgraceful crime to produce semen and excite the woman, and to frustrate her at that very moment.
Martin Luther, Lectures on Genesis: Chapters 38-44