When his attempts failed, and his male victim died, he would keep the corpse until it decomposed beyond recognition,  masturbating and performing sexual intercourse on the body. He would perform sexual activities before and after murdering his victims. Dahmer explained that he only killed his victims because he did not want them to leave. More modern necrophiliacs include Scottish serial killer Dennis Nilsen, and English David Fuller, who is considered the worst offender of this kind in English legal history.Havelock Ellis, in his 1903 volume of Studies of the Psychology of Sex, believed that necrophilia was related to algolagnia, in that both involve the transformation of a supposed negative emotion, such as anger, fear, disgust, or grief, into sexual desire. Classification
In the Diagnostic and Statistical Manual of Mental Disorders, fifth edition (DSM-5), recurrent, intense sexual interest in corpses can be diagnosed under Other Specified Paraphilic Disorder (necrophilia) when it causes marked distress or impairment in important areas of functioning.Forensic Psychologist Anil Aggrawal introduced a ten tier classification of necrophiliacs based on increasing severity of disorder. Additionally, criminologist Lee Mellors typology of homicidal necrophiliacs consists of eight categories (A–H) and is based on the combination of two behavioural axes: destructive (offender mutilates the corpse for sexual reasons) – preservative (offender does not), and cold (offender used the corpse sexually two hours or more after death) – warm (offender used the corpse sexually less than two hours after death). This renders four categories (A-D) to which Mellor adds an additional four (E-H):

Category A (cold/destructive), e.g.
The researchers theorised that either of the following situations could be antecedents to necrophilia:
The necrophiliac develops poor self-esteem, perhaps due in part to a significant loss;
(a) They are very fearful of rejection by others and they desire a sexual partner who is incapable of rejecting them; and/or
(b) They are fearful of the dead, and transform their fear—by means of reaction formation—into a desire. They develop an exciting fantasy of sex with a corpse, sometimes after exposure to a corpse. Motives
The most common motive for necrophiliacs is the possession of a partner who is unable to resist or reject them. However, in the past, necrophiliacs have expressed having more than one motive.The authors reported that of their sample of 34 genuine necrophiliacs:
68% were motivated by a desire for a non-resisting and non-rejecting partner
21% were motivated by a want for a reunion with a lost partner
15% were motivated by sexual attraction to dead people
15% were motivated by a desire for comfort or to overcome feelings of isolation
12% were motivated by a desire to remedy low self-esteem by expressing power over a corpseLesser common motives include:

Unavailability of a living partner
Compensation for a fear of women
Belief that sex with a living woman is a mortal sin
Need to achieve a feeling of total control over a sexual partner
Compliance with a command hallucination
Performance of a series of destructive acts
Expression of polymorphous perverse sexual desires
Need to perform limitless sexual activityIQ data was limited, but not abnormally low. About half of the sample had a personality disorder, and 11% of true necrophiliacs were psychotic.