I Am Legend is a 2007 American post-apocalyptic action thriller film directed by Francis Lawrence from a screenplay by Akiva Goldsman and Mark Protosevich and starring Will Smith as US Army virologist Robert Neville. Loosely based on the 1954 novel of the same name by Richard Matheson, the film is set in New York City after a virus, which was originally created to cure cancer, has wiped out most of mankind, leaving Neville as the last human in New York, other than nocturnal mutants. Neville is immune to the virus, and he works to develop a cure while defending himself against the hostile mutants. It is the third feature-film adaptation of Matheson's novel following 1964's The Last Man on Earth and 1971's The Omega Man.


An attempt to genetically re-engineer the measles virus to cure cancer becomes lethal, infecting 99% of the world's population, turning those it does not kill into vampiric, albino, cannibalistic mutants called Darkseekers, who are extremely vulnerable to sunlight and prey on the few who are left unaffected.