In casting Daniela Vega in “A Fantastic Woman,” helmer Sebastian Lelio knew he was taking a risk. “I knew I could pay a price for making Daniela the focal point of the film, but if it succeeded, then we would gain something precious,” he says. “Her physical presence carries the story in a way no other person’s can.”

Their collaboration began when he was referred to her while seeking some insight into the lives of transgender people in Chile.

Since he was based in Berlin, they used Skype and emailed for at least a year until he realized that no other person could play the character he had created with co-scribe Gonzalo Maza.

The film “flirts with multiple genres: It’s a romance, a ghost story, a fantasy film, a document of reality and a character study,” he notes. “This stylistic expansion is what attracted me because it meant I could expand my own identity as a filmmaker.”

Given its LGBT theme, it would have been more predictable to shoot the film with a handheld camera in a raw, cinema verite style; instead, he shot it with “a certain flamboyance, classicism and splendor. That’s the most subversive aspect of the film; creating an aesthetic tension between the theme and form was the most complex and difficult challenge.”

The scene in which Vega’s character is leaning against a gale at an extreme angle is Lelio’s nod to Buster Keaton.

Vega plays Marina Vidal whose sexuality is not immediately obvious as the story begins like a classic ’50s tale of a couple in love.

When the older man dies suddenly, Marina’s world comes crashing down and the real story begins. Marina endures the transphobia and discrimination of authorities and her lover’s family.

“Some scenes were difficult but I felt protected by the cast and crew,” says Vega, an autodidact who had some acting experience and was training to be a lyrical soprano when Lelio tapped her.

Thanks to her newly found fame, she is fielding various offers. She has two new projects in the pipeline this year.

With his equally acclaimed 2013 film about a divorcee, “Gloria,” and his upcoming English-language debut “Disobedience” about Orthodox Jewish women, played by Rachel Weisz and Rachel McAdams, who engage in an illicit affair, some people believe that Lelio has made a trilogy.

“It wasn’t a conscious decision on my part but all three explore femininity and women who are at the margins of society.”

“A Fantastic Woman” comes at an opportune time when more instances in pop culture, especially on television, is helping to foster understanding and tolerance of the trans community as a whole.