Scarlett Johansson has exited Rupert Sanders’s Rub & Tug, in which she was cast as trans man Dante “Tex” Gill. A backlash greeted the news that Johansson had been cast as the Pittsburgh resident who ran massage parlours as fronts for a prostitution business in the 1970s. Johansson was criticised for accepting a role that should have been offered to a trans person. She was also the subject of a parody video in which trans male actors auditioned for roles she had appeared in.

Johansson announced her withdrawal from the movie by issuing a statement in the LGBT magazine Out on Friday. “In light of recent ethical questions raised surrounding my casting as Dante Tex Gill, I have decided to respectfully withdraw my participation in the project,” she said. “Our cultural understanding of transgender people continues to advance, and I’ve learned a lot from the community since making my first statement about my casting and realize it was insensitive.”

Johansson’s representative had said that the question of whether the actress should have been cast in Rub and Tug should also be asked of Jeffrey Tambor, Jared Leto and Felicity Huffman, all non-trans actors who have played trans persons.

“I have great admiration and love for the trans community and am grateful that the conversation regarding inclusivity in Hollywood continues,” Johansson added in her statement. “According to GLAAD, LGBTQ+ characters dropped 40% in 2017 from the previous year, with no representation of trans characters in any major studio release. While I would have loved the opportunity to bring Dante’s story and transition to life, I understand why many feel he should be portrayed by a transgender person, and I am thankful that this casting debate, albeit controversial, has sparked a larger conversation about diversity and representation in film.”

GLAAD, the body that monitors LGBT representation in the media and entertainment industries, welcomed the decision. “Scarlett Johansson’s announcement, together with the transgender voices who spoke out about this film, are game changers for the future of transgender images in Hollywood,” Variety quoted GLAAD president and CEO Sarah Kate Ellis as saying. “Hollywood changed how Americans understand gay and lesbian lives, and TV is starting to do the same for transgender people with authentic transgender portrayals being major hits with critics and audiences. The film industry has a real opportunity to do the same.”