Spider-Man 2 is a 2004 American superhero film based on the Marvel Comics character Spider-Man. Directed by Sam Raimi and written by Alvin Sargent from a story conceived by Michael Chabon and the writing team of Alfred Gough and Miles Millar, it is the second installment in Raimi's Spider-Man trilogy, following the 2002 film. The film stars Tobey Maguire as Peter Parker / Spider-Man, alongside Kirsten Dunst, James Franco, Alfred Molina, Rosemary Harris, and Donna Murphy. Peter Parker fights to stop scientist Dr. Otto Octavius from recreating a dangerous experiment, while also dealing with a personal crisis.
Principal photography began in April 2003 in New York City and also took place in Los Angeles. Reshoots took place later that year and concluded in February 2004. Danny Elfman returned to compose the score.