Immediately after
Spider-Man 2 (2004) released,
Ivan Raimi wrote a plot for the third film in two months. According to
Sam Raimi, the film initially dealt with the concept of heroes with a dark side, and villains with a sympathetic side. As well as dealing with the "triangle" between Peter, Mary Jane and Harry, the
Sandman was made the film's official "villain"; the screenwriters made his character, merely a petty criminal in the comics, the real killer of Ben Parker to further Peter's guilt over his uncle's death. Raimi
wanted another villain in the film, and eventually
settled on the popular villain
Venom to please the fans. There was also the addition of a rival love interest, Gwen Stacy, to complicate personal matters. However, with all these additions, the story became so complex
that Alvin Sargent considered cutting it into two films, before realizing he could not create a successful intermediate climax for the third film to lead into the fourth.