Scarlett Johansson has pulled out of the film “Rub & Tug” after her plans to portray a transgender man prompted a backlash. (Photo by Jordan Strauss/Invision/AP, File)

Scarlett Johansson has pulled out of her transgender role in 'Rub & Tug' after she was heavily criticised by the LGBTQ+ community. 

The 33-year-old actress was cast as a mob-connected massage parlour owner - who was a woman but lived life as a man - in the movie, but she's since decided to step down after some claimed the role should have gone to a transgender actor instead.

Speaking to Out magazine, she said: "I've learned a lot from the community since making my first statement. 

"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. 

"I am thankful that this casting debate... has sparked a larger conversation about diversity and representation in film."

When the news of her casting came out, fans took to their social networking sites to slam the decision and claimed it proved how many limited opportunities there were for transgender actors. 

However, Johansson was initially quite defiant and told anyone who had a problem with her casting to speak to the director.

She said in a statement: "Tell them they can be directed to Jeffrey Tambor, Jared Leto, and Felicity Huffman's reps for comment."

The film is based on the life of Dante 'Tex' Gill, a notorious figure in the Pittsburgh underworld in the late 70s and early 80s, who masqueraded as a man in order to run a massage parlour and prostitution business. 

She also ran an anabolic steroids ring for NFL team the Pittsburgh Steelers and used her connections in the gay community to deceive the mob until she was eventually convicted of tax evasion in 1984 and spent seven years in prison.