Spider-Man 3 is a 2007 American superhero film based on the Marvel Comics character Spider-Man. Produced by Columbia Pictures, Marvel Studios, and Laura Ziskin Productions, and distributed by Sony Pictures Releasing, it was directed by Sam Raimi from a screenplay he co-wrote with his brother Ivan and Alvin Sargent. It is the third and final installment in Raimi's Spider-Man trilogy, and the sequel to Spider-Man (2002) and Spider-Man 2 (2004). 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. It also marks the final acting appearance of Cliff Robertson before his retirement in the same year and his subsequent death in 2011.