You might compare this documentary about the dying practice of transhumance in the Montana Rockies to the pioneering anthropological films of Robert Flaherty, though producer and co-director Ilisa Barbash has explicitly referenced the 1925 “Grass,” the film about the seasonal movement of herds in Persia made by Merian C. Cooper, as an inspiration. But one needn’t know any of its antecedents to find “Sweetgrass” a fascinating portrait of a vanishing way of life.

Gently, patiently the film follows the 2003 drive—the last into the Absaroksa-Beartooth Mountains—from beginning to end. It begins with the shearing of the sheep and the birth of lambs at the ranch, and then records the herd being taken up the mountains by two drovers, the older, more taciturn and even-tempered John Ahern and younger, more loquacious and emotional Pat Connolly. Once they reach the upper fields where the sheep can pasture, their days are spent keeping the animals together and their nights not just sleeping but warding off predators like bears and wolves when the dogs detect their presence or sheep turn up gutted. As the season nears its close, the strain on both men is palpable, though the more experienced Ahern bears it better.

John’s equanimity is even more in evidence on the return leg, when Pat, decidedly the chattier of the two (though in the early stages he’s nearly silent, too), delivers two longish, unforgettable diatribes. One is a phone call to his mother as he stands atop a peak to get reception and complains about his injured knee and the difficulty of the drive. The other is a hilariously obscenity-riddled harangue to the recalcitrant sheep when they fail to stay together. And there’s a poignant coda as the sheep are taken off to market and the shepherds drive off to an unknown future, with John postponing even thinking about the matter until he’s had a long rest.

It’s easy to call “Sweetgrass” the real “Brokeback Mountain”—the one without the sex, except perhaps among the animals. But it’s also a haunting reverie to a bygone age and a tip of the hat—one like John’s, with a little pin of a sheep affixed to the brim—to the men who endured incredible hardships in doing a necessary job.

And along the way it’s also a unique, and moving, portrait of the sheep. As one watches the docile creatures being sheared, or the newborn lambs being introduced to new “mothers,” the picture makes you feel for the animals without anthropomorphizing them. The long shot of one of the beasts staring into the camera near the start stays with you as much as the one of John greeting the sheep in the morning or dozing off under a tree in the sun.

Some viewers will be put off by the deliberation of the film and consider it about as interesting as watching grass grow. But for the patience, the visually arresting, emotionally rich “Sweetgrass” will prove a fine record of a bittersweet event, weakened only by DV camerawork that’s unhappily grainy when blown up to 35mm.