Grade: A

Andrew Dominik’s elegiac, formally lustrous take on the last months of the notorious outlaw Jesse James’ life and his death at the hands of an obsessive hanger-on is the cinematic equivalent of a Homeric epic—a comparison that seems oddly apt in view of the fact that Brad Pitt, who plays James, was also Achilles in “Troy,” Wolfgang Peterson’s version of “The Iliad.” But that film was a boys’ adventure adaptation of the ancient poem. Dominik’s film, based on Ron Hansen’s novel, is closer to its fatalistic spirit, an ambitious, mesmerizing evocation of the mystique of celebrity and the strange mixture of admiration and envy it generates that hearkens back to John Ford’s “The Man Who Shot Liberty Valance.” And like “The Wild Bunch,” though in a completely different style, it’s a reverie about the American West at the cusp of the modern age, succeeding where another of its forerunners, the sporadically effective end-of-an-era “Heaven’s Gate,” largely failed.

But “The Assassination of Jesse James by the Coward Robert Ford” is a film that’s enormously impressive on its own—thoroughly engrossing despite is length and deliberate pace, and unfailingly beautiful to behold, thanks to the extraordinary work of master cinematographer Roger Deakins. Even the fact that it’s heavily narrated (by Hugh Ross)—usually a bad sign—works in this case, giving it the feel of a mythic tale being recited by some unseen bard.

And it contains one great performance. Not that of Pitt, who won the Best Actor award at the recent Venice Film Festival and is quite good as the bandit who, as the story begins, pulls one last train job before going into a troubled retirement in which he has to be constantly on guard, suspicious of his supposed friends as well as his adamant foes. But his big, almost operatic turn is actually overshadowed by the far quieter, stiller one by Casey Affleck as Robert Ford, the wimpy young idolater who gains his notoriety by killing the outlaw and publicizing the deed. The antithesis of the man he wants to be, he’s really the hero of the piece, a tragic hero—and Affleck makes you feel his inchoate pain and unspoken despair with perfect restraint.

The story of Ford’s murder of James has been told on screen many times before, of course, mostly in the context of a fictionalized treatment of the outlaw like Henry King’s 1939 “Jesse James.” The most direct comparison is Sam Fuller’s debut feature, “I Shot Jesse James” (1949), in which John Ireland played the killer and Reed Hadley his victim. That’s a flawed but intriguing film, but it’s completely upstaged by Dominik’s, which follows that elaborate, hallucinatory portrayal of the gang’s last railway job in September, 1881 (and the departure of Jesse’s brother Frank, played with stern strength by Sam Shepard) with separate strands focusing on Jesse, who settles down under a false name with his wife (Mary-Louise Parker) and kids, and his old companions Dick Liddil (Paul Schneider), Wood Hite (Jeremy Renner), Ed Miller (Garret Dillahunt) and brothers Charley and Robert Ford (Sam Rockwell and Affleck).

The script crosscuts among the various hideouts frequented by the men, often so nonchalantly that one might think the structure flabby. But in fact it’s all cannily fashioned by Dominik and edited (by Dylan Tichenor and Curtiss Clayton) to emphasize several points: the internal antagonisms among the gang members, Bob’s combination of personal weakness and obsession over Jesse, and Jesse’s inveterate awareness that his own men might be plotting to turn him in. The technique gradually builds an awareness of the mixture of deep suspicion and fatalism that exists in the hunted man, which coalesces in his treatment of Ford, whom he takes into his house though he seems to know that the boy can’t be trusted. There’s more than a touch of Judas in the assassin, who’s shown selling out James to the authorities (including Governor Crittenden, whom political consultant James Carville plays zestfully) and then trying to parlay the circus-like atmosphere that follows the murder into his own celebrity career. In the last act, where the focus turns exclusively to Ford’s sad last days, Affleck’s somber fragility more than ever becomes the pervasive spirit of the film.

Throughout the look of the film is luxuriantly evocative. The Canadian locations are magnificent, the art direction (by Troy Sizemore and Martin Gendron) flawless, and the sets and costumes equally fine; and Deakins captures all of them with exquisite care. But this would count for little were the performances not so strong, first of all from Pitt, who conveys Jesse’s swings from apparent affability to sinister calculation with surprising skill, and Affleck, who makes Ford at once pathetic and frightening. The secondary cast offer strong support, with Rockwell, Schneider and Renner especially memorable.

Though it hews fairly closely—if often elliptically and allusively—to the historical record, “Jesse James” hardly aims for a documentary sort of accuracy, and at 160 minutes it’s certainly long by conventional standards. But anyone who allows himself to be captivated by its dreamlike style and mythic power won’t find it so. In fact, it’s so good you’re sorry to see it end.