Scarlett Johansson will no longer play a transgender man in the upcoming film “Rub & Tug,” the actress announced after intense backlash.

“I have great admiration and love for the trans community and am grateful that the conversation regarding inclusivity in Hollywood continues,” Johansson said Friday in an exclusive statement to Out.com. “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.”

Johansson made her decision “in light of recent ethical questions raised surrounding my casting,” she said in the statement. A rep for the actress declined to comment further when reached by Moneyish.

The LGBTQ community in Hollywood and beyond had criticized the “Ghost in a Shell” star for her role in the forthcoming crime biopic, based on the true story of a transgender massage parlor owner Dante “Tex” Gill. Many questioned why the opportunity was not offered to a trans actor, and bashed Johansson for accepting it.

Trace Lysette, best known for playing Shea on Amazon’s “Transparent,” took to Twitter in outrage. “I wouldn’t be as upset if I was getting in the same rooms as Jennifer Lawrence and Scarlett for cis roles,” she wrote. “But we know that’s not the case. A mess.”

Actress Jamie Clayton from “Sense8” and “The Neon Demon” also expressed anger over the casting choice, noting, “Actors who are trans never even get to audition FOR ANYTHING OTHER THAN ROLES OF TRANS CHARACTERS.”

Johansson, for her part, didn’t do much to appease critics initially. When the website Bustle reached out to her representative for a statement regarding the controversy, it received the response: “Tell them that they can be directed to Jeffrey Tambor, Jared Leto, and Felicity Huffman’s reps for comment.” (Those cisgender actors have won awards and critical acclaim for their portrayals of transgender characters.)

April Reign, the creator of #OscarsSoWhite, also criticized Johansson for taking on the role, noting that she could’ve afforded to turn it down.

“Scarlett Johannson is not hurting for money. She is in the Marvel Cinematic Universe and is about to get her own film: Black Widow. She is also a well-established actress so she doesn’t need the increased profile. So why would she take work away from a trans actor? #OscarsSoWhite”

And the Annenberg Inclusion Initiative — the University of Southern California research group behind the inclusion rider — also expressed dismay on Twitter: “Another step in the wrong direction! @Timesup,” the account tweeted.

Critics also pointed out that “Rub & Tug” would be directed by Rupert Sanders, the same man who directed Johansson in “Ghost in the Shell,” a live-action Hollywood remake of one of the most successful Japanese anime movies ever. Johansson played the movie’s heroine, originally named Motoko Kusanagi — prompting many to criticize the film for whitewashing, as critics insisted the role should have gone to a Japanese actor.

It’s worth noting that only two trans characters appeared in major films in 2015 and 2016. Benedict Cumberbatch’s parody of a non-binary person named “All” in “Zoolander 2” in 2016 received major backlash from LGBTQ activists, who called for a boycott of film on grounds of transphobia. And 2015’s “Hot Pursuit” briefly featured a trans woman. Aside from that, despite the success of shows like “Transparent” and Laverne Cox’s Emmy nomination for her role in “Orange is the New Black,” TV and film have yet to bring forth significant lead casting opportunities for trans actors.

A number of cisgender actors, meanwhile, have taken on trans roles in recent years, including the likes of Elle Fanning, who portrayed teen transgender male Rey in “3 Generations”; Jared Leto in “Dallas Buyers Club”; Eddie Redmayne in “The Danish Girl” and, most recently, Matt Bomer in “Anything.” Executive producer Mark Ruffalo took the heat from GLAAD’s director of transgender media and representation, Nick Adams, who wrote an op-ed for The Hollywood Reporter in 2016 titled: “Matt Bomer and Men Who Play Transgender Women Send a ‘Toxic and Dangerous’ Message.”

“The decision to put yet another man in a dress to portray a transgender woman touches a nerve for transgender people, and rightfully so,” Adams wrote. “It’s yet another painful reminder that, in the eyes of so many people, transgender women are really just men.”

This article was originally published July 5, 2018, and has been updated.