Spider-Man 2 is a 2004 American superhero film directed by Sam Raimi and written by Alvin Sargent from a story by Alfred Gough, Miles Millar and Michael Chabon. Based on the fictional Marvel Comics character of the same name, it is the second installment in the Spider-Man trilogy and a sequel to 2002's Spider-Man film, starring Tobey Maguire alongside Kirsten Dunst, James Franco, Alfred Molina, Rosemary Harris, and Donna Murphy. Set two years after the events of Spider-Man, the film finds Peter Parker struggling to manage both his personal life and his duties as Spider-Man, which affects his civilian life dramatically. Meanwhile, Dr. Otto Octavius becomes a diabolical villain after a failed experiment kills his wife and leaves him neurologically fused to mechanical tentacles. Spider-Man must stop him from successfully recreating the dangerous experiment, while dealing with a subconscious desire to stop being Spider-Man that is stripping him of his powers.