It isn’t easy to make a first-rate tearjerker, but it can be done: one need think only of David Lean’s classic “Brief Encounter” (1945), and more recently Clint Eastwood’s surprisingly effective “The Bridges of Madison County” (1995) as examples. Ang Lee’s remarkable “Brokeback Mountain” joins the select group.

In its basic outline the story couldn’t be much simpler–or more familiar. Two people have a short, spontaneous and hopeless sexual encounter and then separate, each marrying someone else and building a family. Yet their attraction to one another is irresistible, and they meet periodically over the years for brief, intense moments together. Ultimately, though, tragedy intervenes.

The twist in this telling of the tale, adapted by Larry McMurtry and Diana Ossana from what’s become a famous short story by Annie Proulx, of course, is that the doomed lovers are both male. Not that such a circumstance is totally unheard of on film. This is, however, the first time it’s been done in a major picture by an A-list director and with well-known stars; it doesn’t come from one of the major studios, but isn’t far from one. And the fact that the men are young cowboys–iconic figures of virility and strength–adds to the sense of provocation some will feel about it.

But ultimately this story of suppressed passion is, irrespective of gender considerations, a deeply moving, indeed lacerating, film. Though many commentators, and more importantly, viewers, may concentrate on the fact that the lovers are both men, that’s really a secondary consideration in a narrative that succeeds beautifully merely because it’s deeply human and profoundly real– and, of course, because in this incarnation it’s also insightfully written, sensitively (some would say too sensitively) directed, and superbly acted. Within the “gay” genre, “Brokeback Mountain” is a triumph; but the fact that it extends that genre’s boundaries only adds to its power.

The picture begins in 1963 Wyoming, where two dissimilar cowpokes–tough, laconic Ennis Del Mar (Heath Ledger), and garrulous, sinewy Jack Twist (Jake Gyllenhaal) are hired by rough rancher Joe Aguirre (Randy Quaid) to tend a herd of sheep high in the mountains over the summer months. Over their weeks of isolation from the rest of the world, they develop a general camaraderie, but one cold night, when they share a small tent for the sake of warmth, they almost accidentally engage in much more, and continue to do so, each denying that he’s “queer,” though both feels a passionate longing for the other. At summer’s end, they go off separately, and each marries–Ennis a girl named Alma (Michelle Williams), with whom he builds a hardscrabble life with two daughters, and Jack a rodeo rider named Laureen (Anne Hathaway), with whom he has a son and for whose father he goes to work. After years apart Jack contacts Ennis saying he’s stopping by for a visit, and Del Mar’s reaction, like a youngster overcome with anticipation, and his inability to control himself when Jack finally appears, testify to the fact that if anything the desire has only increased over the years. That first renewed contact leads to “fishing trips” periodically from that point on–and inevitably to the unraveling of their marriages. And while Jack pleads that they could make a life together, Ennis insists that it’s an impossibility. Finally the long, always incomplete relationship comes to an end that should touch the hardest heart, provided that prejudice is set aside.

Proulx’s modest but riveting story has been expertly expanded to feature length by Larry McMurtry and Diana Ossana, whose literary talents are surely well-known, and Ang Lee has treated their script lovingly, with a quiet serenity that some may dismiss as lethargic but actually gives the tale–and the performances–the time and space to blossom. The film’s anchor is Ledger, whose career rejuvenation this year reaches a pinnacle here with a painfully moving turn as the withdrawn, taciturn man who finds release only in the presence of his secret lover. Gyllenhaal, as the more talkative and extroverted of the pair, can’t match Ledger, but his boyish exuberance serves as a proper foil to him. Though this is primarily a two-character piece, both Hathaway, and especially Williams, have their moments as the men’s wives, as do Randy Quaid as the boss who barely tolerates the duo even before he finds out what they’ve been up to while on the job, Linda Cardellini as a woman Ennis takes up with and Anna Faris as the bubbleheaded wife of one of Twist’s acquaintances. And Roberta Maxwell and Peter McRobbie cut to the quick in the film’s wrenching final scenes.

“Brokeback Mountain” is elegantly shot by Rodrigo Prieto, particularly in the gorgeous outdoor sequences but in the interiors as well, and Judy Becker’s production design reflects the passage of time without undue exaggeration. Gustavo Santaolalia’a score is unhurried and expressive, much like the film as a whole. The subject alone will make some viewers resist, but that will be their loss.