I Am Legend is a 1954 horror fiction novel by American writer Richard Matheson. It was influential in the development of the zombie genre and in popularizing the concept of a worldwide apocalypse due to disease.
The main character is Robert Neville, apparently the sole survivor of a pandemic whose symptoms resemble vampirism. It is implied that the pandemic was caused by a war, and that it was spread by dust storms in the cities and an explosion in the mosquito population. The narrative details Neville's daily life in Los Angeles as he attempts to comprehend, research, and possibly cure the disease, to which he is immune. Neville's past is revealed through flashbacks.
The vampires only come out at night and become comatose by day, though they also sometimes come out earlier during cloudy weather. Neville survives by barricading himself by sunset inside his house, further protected by garlic, mirrors, and crosses. Swarms of vampires would regularly surround his house, trying to find ways to get inside. During the day, he scavenges for supplies and methodically searches out the inactive vampires, driving stakes into their hearts to kill them.
After bouts of depression and alcoholism, Neville decides to find out the scientific cause of the pandemic. He obtains books and other research materials from a library, and through painstaking research discovers the root of the vampiric disease in a strain of bacteria capable of infecting both deceased and living hosts. He also discovers that much of the efficacy of the garlic, mirrors, and crosses were actually "hysterical blindess", the result of previous psychological conditioning of the infected (particularly the religious) who believed that they were effective against vampires. Driven to insanity by the disease, the vampires now reacted as they believed they should react when confronted with these items. Even then, it was constrained to the beliefs of the particular person, such that a vampire who was Christian would fear the cross, but a vampire who was Jewish would not.
Neville also discovers more efficient means of killing the infected, other than just driving a stake into their hearts. This included exposing them to direct sunlight (which killed the bacteria) or inflicting deep wounds on their bodies so that the bacteria switch from being anaerobic symbionts to aerobic parasites, rapidly consuming their hosts when exposed to air. He is now killing such large numbers of vampires in his daily forays that his nightly visitors have diminished significantly.
After three years, Neville sees an apparently uninfected woman, Ruth, abroad in the daylight, and captures her. After some convincing, Ruth tells him her story of how she and her husband survived the pandemic (though her husband was killed two weeks earlier). Neville is puzzled by the fact that she is upset when he speaks of killing vampires, on grounds that if her story of survival was true, she would have become hardened to the act. One night Neville is startled awake and finds Ruth about to leave. Suspicious, he questions her motives, but relates the trauma of his past, whereupon they comfort each other. Ruth reluctantly allows him a blood sample but knocks him senseless when he realizes she is infected. When he wakes, Neville discovers a note from Ruth confessing that she is actually infected and that Neville was responsible for her husband's death. Ruth admits that she was sent to spy on him. The infected have slowly overcome their disease until they can spend short periods of time in sunlight and are attempting to rebuild society; but they fear and hate Neville who has destroyed some of their people along with the true vampires (dead bodies animated by the germ) during his daytime excursions against the latter. Ruth warns Neville that her people will attempt to capture him, and that he should leave his house and escape; but Neville disregards Ruth's warning and is captured.
Neville wakes in a prison where he is visited by Ruth, who informs him that she is a ranking member of the new society but, unlike the others, does not resent him. She acknowledges the need for Neville's execution, and gives him pills, claiming they will "make it easier". Badly injured, Neville accepts his fate and asks Ruth not to let this society become heartless. Ruth kisses him and leaves.
Neville goes to his prison window and sees all the infected waiting for his execution. Judging by their reactions to the sight of him, he now recognizes their point of view. Having hitherto seen the destruction of the infected survivors as a moral imperative to be pursued for his own and mankind's survival, he failed to realize that the infected have come to view him in fear and awe. To them, he was an invisible killer who moved by day, killing their loved ones as they hibernated. He realizes that even as vampires were legend in pre-infection times, he, a remnant of old humanity, is now a legend to the new race born of the infection. He therefore remarks to himself as he dies: "[I am] a new superstition entering the unassailable fortress of forever. I am legend".