The makers of drug-war thriller Sicario, starring Emily Blunt, Benicio del Toro and Josh Brolin, revealed that they had been under pressure to rewrite the lead role, a female FBI agent played by Blunt, as a man.

Speaking to journalists at the Cannes film festival after the press screening of Sicario, which is competing for the Palme d’Or, the film’s director Denis Villeneuve confirmed that screenwriter Taylor Sheridan had been asked, before he came aboard the project, to change the gender of the lead role.

“The screenplay was written some years ago,” Villeneuve said, “and people were afraid that the lead part was a female character, and I know several times [Taylor Sheridan] had been asked to rewrite the role. When I got involved, the script was as it is, and I embraced it, as did [producers] Black Label and Thunder Road. But the pressure came before, and these guys had the guts to keep it as it was.”

Sicario follows a US team drawn from a number of agencies as it responds to gruesome killings in the borderlands between the US and Mexico, resulting from the increasing leakage of Mexican cartels’ activities north of the border. Blunt’s character, Kate Macy, initially is part of a team raiding a house owned by the cartel in Arizona, but is then attached to a group operating over the Mexican border in Ciudad Juárez, location of even more appalling acts of “narco-terror”.

In sight of the action ... Benicio del Toro in Sicario Photograph: Cannes film festival

Blunt said that in the course of the research for her role she spoke to a number of female FBI agents and undertook training in New Mexico with a DEA team. “We had to learn the choreography of a Swat team: it’s very intricate, almost like a dance. The FBI are actually incredibly efficient, it was good to see the restraints of being in that job.”

It was also pointed out that Blunt’s character is the only female character of any substance, and has no dialogue with any other women in the film, meaning it would comprehensively flunk the Bechdel test. Blunt implied that Macy’s experience as an female agent is analogous to women’s experience in the film industry – “she is trying to survive in a predominately male-driven profession” – but said she felt uncomfortable with the idea that Macy was simply a “tough female” role.

Benicio Del Toro, Emily Blunt, and director Denis Villeneuve at the press conference for Sicario. Photograph: CLEMENS BILAN / POOL/EPA

“I get asked to do a lot of these roles, but I don’t see them as ‘tough’. You can’t compartmentalise strong women like that, they are far more complex. This character is damaged and troubled, struggling with the morally questionable things she experiences.

“The FBI agents I spoke to are just normal girls: they go home and watch Downton Abbey, you definitely would want to have a beer with them. I found it interesting to get under the skin of being a female cop: what it costs you, how it affects your marriage, how you cope with the men working alongside you.”

At the same press conference, Blunt also spoke of her disdain for the apparent ban on women wearing flat-heeled shoes for the film festival’s black-tie events, saying it was “very disappointing”.