Shane Black, the director and co-writer of Iron Man 3, has said he was forced to change the gender of the film’s villain from female to male after pressure from the production company Marvel, which feared toy merchandise would not sell as well.

In an interview with Uproxx, Black said the original Iron Man 3 script featured a female version of Aldrich Killian, eventually played by Guy Pearce. “We had finished the script and we were given a no holds barred memo saying that cannot stand and we’ve changed our minds because, after consulting, we’ve decided that toy won’t sell as well if it’s a female.

“So, we had to change the entire script because of toy-making. Now, that’s not [Marvel Studios president Kevin] Feige. That’s Marvel corporate.”

Black said in the original script he had hoped audiences would assume the character was male, before her true gender was revealed. “I liked the idea, like Remington Steele, you think it’s the man but at the end, the woman has been running the whole show. They just said: ‘No way.’ ”

He also said he did not know who, exactly, in Marvel made the decision – but he did not believe it was made by Feige.

“Kevin Feige is the guy who gets it right. And I don’t know if it was Ike [Marvel chief executive Isaac Perlmutter]. I don’t know who it was.”

The long-running creative differences between Perlmutter and Feige have been largely attributed to a 2015 organisational reshuffle that allowed Feige to report directly to the chairman of Walt Disney Studios, Alan Horn, essentially sidestepping Perlmutter.

In an email leaked in the Sony hack, Perlmutter wrote to the CEO of Sony, Michael Lynton, with the subject line “Female Movies”, listing three superhero films with female leads he considered box office disasters: Electra [sic], Catwoman and Supergirl.

Black said the roles of two female characters were also reduced over the course of the production: Ellen Brandt, played by Stéphanie Szostak, and Maya Hansen, played by Rebecca Hall.

Released in 2013, Iron Man 3 grossed $1.2bn at the global box office, according to Box Office Mojo. In March Robert Downey Jr, who plays Iron Man, confirmed there were no plans for a fourth instalment, although the character continues to appear in Marvel’s Captain America film series.

It is the second time this year Disney has been embroiled in controversy over their superhero merchandise strategy. In January a Star Wars-themed Monopoly game was released by Hasbro without a figurine of Rey, the lead character of the latest chapter of the film franchise. It followed complaints she was also under-represented in figurine packs, with fans rallying under the hashtag #WheresRey on social media.

Disney was contacted but declined to comment.