The “other woman” in a man’s life is treated disdainfully by her lover’s family—especially his ex-wife—when he suddenly dies. This might have been the plot of a weepie from the 1940s, but in Sebastián Lelio’s film the situation is complicated by the fact that she is a transgender female. And while one can imagine certain actresses of the golden age who might have been able to pull off such a role convincingly—maybe Bette Davis, or Joan Crawford, or Barbara Stanwyck—it’s the greatest strength of “A Fantastic Woman” that the lead is triumphantly taken by a trans actress, Daniela Vega, and her performance is remarkably subtle and refined. It is, in fact, easily the best thing in the film, which is otherwise surprisingly schematic and obvious.

The initial scenes of the film show Marina (Vega), who sings at a club in Santiago, enjoying a birthday celebration with her much older lover Orlando (Francisco Reyes). She’s just at the point of moving in with him, but on their very first night together at his place, he falls ill. She transports him to the hospital, where he dies as a result of an aneurysm; but on the way out of the apartment building, he had fallen down a flight of stairs and sustained some serious bruises, as well as a concussion, leading the attending physician, who looks askance at Marina anyway, to be suspicious.

That brings the police into the case; the officer who first enters the scene treats Marina with obvious disdain, addressing her by her birth name (Daniel, as we learn), though Adriana (Amparo Noguera), the female detective who takes over the case, is more empathetic. Even she, however, is uncertain—the fact that for some reason Marina withholds information about the fall down the stairs confuses matters—and compels her to undergo a humiliating physical examination (though her suspicion is not that she killed Orlando, but that he might have attacked Marina, prompting her to take defensive action).

The most brutal treatment, however, comes from Orlando’s family. Though his brother Gapo (Luis Gnecco) is apologetic ad even haltingly supportive, his obnoxious son (Nicolas Saavedra) orders her to leave his father’s apartment immediately. Equally unpleasant is Orlando’s ex-wife Sonia (Aline Kuppenheim), who demands the return of Orlando’s car and tries to bribe her from coming to the dead man’s funeral. Gapo offers her a portion of his brother’s ashes as compensation, but Marina dismisses the suggestion with a hint of repressed anger.

In the midst of the turmoil Marina looks for some solace from her voice teacher (Sergio Hernandez), who is sympathetic to what she is feeling but offers mostly encouragement for her to develop her vocal talent. More openly supportive is her sister (Trinidad Gonzalez), though her husband (Nestor Cantillana) advises caution. Marina is intent, however, on attending Orlando’s funeral despite the family’s hostility, which leads to their harshest treatment of all—a physical assault. Still Marina does not relent, and in the end claims the right to say farewell to the man she loved.

All of this is emotionally affecting, given the strength of Vega’s performance, but also rather formulaic, the series of humiliating episodes coming across as a virtual checklist of societal prejudices against transgendered persons. Some of the musical choices, too, feel extremely on-the-nose, like Marina’s listening to Aretha Franklin’s “A Natural Woman” as she drives to her appointment with Sonia (she even gets a car wash along the way, removing all potentially offensive traces, one supposes, of her relationship with its dead owner).

And yet one can’t but be moved by the film’s sincere desire to stand up for an oppressed minority, or by its use of Handel’s rapturous aria “Ombra mai fu” from “Serse” to represent Marina’s resilience and beauty. Vega carries the film with a turn that shows the vulnerability beneath her seemingly stoic exterior, but the supporting cast is fine down the line, and technically all is well, with Benjamin Echazarreta’s cinematography excellent in both the naturalistic sequences and those that are more impressionistic, like Marina’s nightclub visits, her trip to Orlando’s sauna club to check on the contents of his locker, or her surrealistic experience in the crematorium where she makes final contact with him.

“A Fantastic Woman” may not deserve the adjective of the title, but Vega certainly does; her performance makes an imperfect film worth seeing.