Spider-Man 3 is a 2007 American superhero film based on the Marvel Comics character Spider-Man. It was directed by Sam Raimi from a screenplay by Raimi, his older brother Ivan and Alvin Sargent. It is the final installment in Raimi's "Spider-Man" trilogy. The film stars Tobey Maguire as Peter Parker / Spider-Man, alongside Kirsten Dunst, James Franco, Thomas Haden Church, Topher Grace, Bryce Dallas Howard, James Cromwell, Rosemary Harris, and J. K. Simmons. Set a few months after the events of "Spider-Man 2", the story follows Peter Parker as he prepares for his future with Mary Jane Watson, and faces three new villains: Uncle Ben's true killer, Flint Marko, who becomes the Sandman after a freak accident; Harry Osborn, his former friend, who is now aware of Peter's identity and seeks to avenge his father; and Eddie Brock, a rival photographer who becomes Venom. Peter also faces his greatest challenge when he bonds with an extraterrestrial symbiote that augments his abilities but brings out his anger and other negative traits.