Before Brokeback Mountain celebrated gay cowboys, Desert Hearts, which turns 30 this year, explored love between women out west in a film that broke with tradition, giving its main characters a chance at a happy ending.

The 1986 feature — based on Jane Rule's beloved 1964 novel, Desert of the Heart — follows the budding romance between New York City professor Vivian Bell (played by Helen Shaver) and free-spirited casino worker Cay Rivers (Patricia Charbonneau) in Reno, Nev., in 1959. Bell has traveled to Reno to obtain a swift divorce and stays at a ranch where she meets Rivers. Sparks fly between the pair, and though Vivian is set to return to New York, she manages to convince Cay to join her as her train is leaving, if only until the next stop on the train.

While it may seem surprising that this passes for a happy ending, before Desert Hearts lesbian love stories depicted on film had been known to end terribly (spoiler alerts coming!). In The Children's Hour (1961), Martha (Shirley MacLaine) comes out, confesses her love for her best friend, and promptly kills herself.

In Personal Best (1982), the love affair between two women ends when one of the women falls for a man. Even following Desert Hearts, it was quite common for love between women on-screen to end in despair or, at the very least, be unrequited. In Heavenly Creatures (1994), the lovestruck pair end up murdering one girl's mother. In Blue Is the Warmest Color (2013) the main characters don't end up together, as they thankfully did in last year's Carol.

In Certain Women (2016), the genre of queer Western love was again explored when a rancher (Lily Gladstone) falls for teacher Elizabeth Travis (Kristen Stewart). However, that film concludes with the rancher returning to her normal life after Travis ignores her advances.

The ending of Desert Hearts allows room for potential. In addition, it does not entirely present the love between its main characters as a shameful secret, which is perhaps its most notable accomplishment. "I didn't want that lesbian relationship to sit outside of other intimate friendships," director Donna Deitch told In the Life.

There are scenes in which Cay confesses her love for Vivian to close friends, presenting their love not as one "that dare not speak its name," but rather as a cause for celebration, entirely distinguishing the film from many others mentioned.

"I think I found somebody who counts," Cay tells a friend while they take a bath together. Here Deitch shows Rivers as a multidimensional person, able to have close, intimate relationships to other women that are not sexual in nature. Of her love for Vivian, Rivers tells her surrogate mother, Frances, "she just reached in, put a string of lights around my heart."

The bold earnestness with which Rivers declares her love for Bell remains refreshing and inspirational to this day. Rivers is charismatic, assertive, and fearless, which perhaps comes from living outside traditional expectations. Her lack of biological family connections leaves her with no one to disappoint, and the Western landscape she inhabits is as wild and free as her heart.

As a result, the love represented in this film is shown as pure, rather than perverse. While there are definite obstacles Vivian and Cay must circumvent in order to be together, the fact that they are two women is not presented as the sole problem, which even today is a revolutionary achievement in cinema.

The Museum of Modern Art in New York City will be celebrating the anniversary of this historic film with several screenings this week and next, followed by Q&A sessions with director Donna Deitch and stars Helen Shaver and Patricia Charbonneau.