Pitch Perfect 2 director Elizabeth Banks has revealed that she was turned down for the role of Spider-Man’s girlfriend Mary-Jane Watson for the 2002 superhero movie for being “too old” – despite being at 28 only 16 months older than the film’s male lead Tobey Maguire.

Speaking to Glamour magazine, Banks said: “I screen-tested for the role of Mary-Jane Watson in the first Spider-Man movie, opposite Tobey Maguire ... Tobey and I are basically the same age and I was told I was too old to play her. I’m like, ‘Oh, OK, that’s what I’ve signed up for’.”

Tobey Maguire and Kirsten Dunst in 2002’s Spider-Man Photograph: Doug Hyun/AP

The role eventually went to Kirsten Dunst, who was 18 when filming began in 2001. Banks was cast in all three of the Spider-Man trilogy as Betty Brant, the secretary of Daily Bugle publisher J Jonah Jameson (played by JK Simmons). Banks went on to a well-regarded acting career specialising in comedy, including roles in Kevin Smith’s Zack and Miri Make a Porno, Jesse Peretz’s Our Idiot Brother and the Kirk Jones-directed What to Expect When You’re Expecting.

Banks turned to producing with the first Pitch Perfect movie, a surprise hit, before signing up to direct its sequel. However, she recently dropped out of directing Pitch Perfect 3 citing an overcrowded schedule.