Elle Fanning is receiving backlash for her newest movie role. The 19-year-old actress, known for her role in "Super 8," will star as a transgender boy in the upcoming film "3 Generations."

The film follows the story of a transgender teenager, Ray, as he transitions from female to male. Critics are saying the role should have gone to a transgender actor.

But the movie’s director, Gaby Dellal, is defending her decision to cast Fanning.

"The part is a girl and she is a girl who is presenting in a very ineffectual way as a boy," Dellal told Refinery29.

"She’s not pretending to have a deeper voice. She's just a girl who is being herself and is chasing the opportunity to start hormone treatment. So to actually use a trans boy was not an option because this isn’t what my story is about," she said.

Fanning told Teen Vogue in 2015 that she was initially hesitant about the role, but she worked to understand it by speaking with trans kids and doing research on kids in transition.

But the actress was still receiving criticism on social media following a recent release of the movie's trailer.

https://twitter.com/electr0poof/status/851469162581045248

Fanning, whose sister is actress Dakota Fanning, stars alongside Susan Sarandon and Naomi Watts, neither of whom have publicly addressed the controversy.

The film is set to release in May 2017.