In New York City, circa 2009, a cure for cancer was found that put the disease into turnaround for any patient that received the treatment. With this landmark discovery, however, came a catastrophic price, unleashing a physical and airborne virus that turned the infected into vampiric creatures of the night. Three years later, Manhattan is a deserted wasteland with one immune survivor, scientist Robert Neville (Will Smith). As far as he knows, he is the last man left on Earth, roaming around the city during the day with dog Sam and holing up in his home after dark, when the infected come out to prey. Haunted by his final tragic memories of wife Zoe (Salli Richardson) and daughter Marley (Willow Smith), Robert has thus far been unsuccessful in his attempts to find an antibody for the virus in his basement laboratory. There may not even be one.

Loosely based on the classic novel by Richard Matheson and the previous 1971 adaptation, "The Omega Man," "I Am Legend" is a frightening film. What gets under your skin, though, has nothing to do with the conventional horror elements involving, for lack of a better word, the vampires, who have been brought to life not terribly convincingly through CG effects. Indeed, the movie might have been better off excising these bad guys altogether and concentrating on Robert's eerily plausible plight in the face of mankind's extermination. That, above all else, is where "I Am Legend" excels, and it is the solitary day-to-day moments and rituals in the devastated lives of Robert and his trusty canine companion that are most unnervingly effective and dramatically potent.

To be sure, director Francis Lawrence (2005's "Constantine") and screenwriters Mark Protosevich (2006's "Poseidon") and Akiva Goldsman (2006's "The Da Vinci Code") have devised a number of more predictably tense and horror-centric scenes throughout. One set-piece, in which Sam chases a deer into the creatures' darkened lair and Robert must go in to find her, is genuinely nail-biting, as is another sequence where an injured Robert must crawl back to the safety of his truck before the sun goes down and the pack of infected dogs are set free. Still, these villains are too obviously the work of visual effects artists, and could have been improved upon by either using live-action actors or altering their design to make them look less like people and more like the savage, conscience-free monsters they have become. As is, they do not quite appear real or seamless enough in their surroundings to pose the level of threat intended.

Nevertheless, it is the quieter, subtler moments and details that the viewer's mind will likely keep returning to once the film is over. The way, for example, that Robert watches a recording of an old episode of the "Today" show each morning and night, clinging desperately to a connection with civilization that no longer exists. Or the way he devotedly listens to his Bob Marley album, serving to remind him of the hope that may still be in the world and as a dedication to his daughter, whom he named after the musician. Or his excursions to the video store, renting out DVDs from the mannequin he has set up at the cash register. Or his jaunts out to hunt for spare deer near Times Square, only, on one occasion, to come into contact with a family of lions who claim the game as their own. There is also an utterly heartbreaking scene between Robert and Sam, their last together, that will tear up all but the most stoic of audience members. In ruminative segments such as these, "I Am Legend" is note-perfect.

As the lone man of New York City, a scientist who holds himself responsible for the outbreak and who knows that he is the planet's final potential savior, Will Smith (2006's "The Pursuit of Happyness") is extraordinary. The Smith of the last few years bears little resemblance to the wisecracking performer from his days on sitcom "The Fresh Prince of Bel Air" or in decade-old blockbusters like "Independence Day" and "Men in Black," and the steps he has taken to branch out as a multilayered performer while still making commercial projects is greatly admirable. There isn't a sign of mugging in Smith's deeply touching, often silent performance as Robert, and, left to act mostly with himself à la Tom Hanks in 2000's "Cast Away," he is riveting to watch.

"I Am Legend" loses its way a little in the third act as a series of serendipitous, increasingly convenient plot developments take place. Though director Francis Lawrence has trouble organizing a naturalistic conclusion, he should be commended for all of the things he gets absolutely right. The depiction of a desolate, post-apocalyptic New York City landscape is thoroughly chilling and believably rendered, while Robert's inner conflict as he scrambles to deal with what has happened and come to terms with where his own life has led him remains a truthful constant. "I Am Legend" is not without some stumbling blocks, but it also stands as a worthy achievementan engrossing thinking-person's science-fiction tale with a mind and a heart.