LOS ANGELES (Reuters) - Chile’s “A Fantastic Woman,” a drama about a transgender woman who battles her lover’s family after he dies, won the Oscar on Sunday for best foreign language film.

The film, directed and co-written by Sebastián Lelio, marked Chile’s first Oscar victory in that category. It had been considered a favorite to win the award.

The movie’s 28-year-old star, transgender actress Daniela Vega, has appeared in only one film before “A Fantastic Woman.” On Sunday, she became the first openly transgender presenter at an Oscar ceremony, when she introduced a song.

“I want to thank the cast of the film,” said director Sebastián Lelio, “especially the brilliant actor Francisco Reyes and the inspiration for this movie, Daniela Vega.”

Vega plays Marina, a waitress and singer in a relationship with an older, divorced man. When the man has an aneurysm and falls down the stairs, Marina rushes him to the hospital. Before long, police are questioning her about whether she had any part in his death.

Marina contends with even more painful encounters with the man’s family and ex-wife, who threaten, cajole and insult Marina in an effort to keep her away from the memorial service.

The transgender woman’s battles with prejudice are evoked in surrealistic scenes in the movie, which are reminiscent of Latin America’s literary tradition of magic realism.

The Chilean film beat nominees from Russia, Lebanon, Sweden and Hungary.

Actress Rita Moreno, 86, presented the award and had the audience cheering for her as she danced toward the microphone, wearing the same dress she wore when she won an Oscar in 1962 for “West Side Story.”