Though atmosphere-heavy and plot-light, and obviously pushing Brad Pitt for a “he’s doing serious art here” Academy Award, The Assassination of Jesse James by the Coward Robert Ford turns out to be a mesmerizing look at the final months of a gun-toting desperado. Pitt plays Jesse James, the former Confederate soldier who gained fame for his murders and bank robberies, most of them pulled off with cold-blooded panache with his older brother, Frank (Sam Shepard), and the Cole Younger clan.

The film begins with the Youngers either dead or imprisoned and Frank on his way out the door. It is 1881, and Jesse, at 34, is a shadow of his former self. He staggers from hideout to hideout, his life a toxic mix of anger, frustration, fatigue and fear. He has been immortalized in newspapers and dime novels, but the end is near. The only question is how he will orchestrate his exit.

Enter Robert Ford (Casey Affleck), an awestruck 19-year-old. Ford wants to ride with Jesse not for the money but because he idolizes him (or at least the figure he has read about), and he figures that partnering with Jesse will give his useless life some sort of meaning.

This film is beautifully shot by Roger Deakins, and at two hours and 40 minutes it has plenty of time for slow pans of sprawling fields (the film was shot in western Canada), campfire-lit close-ups and numerous subplots involving Jesse’s new gang, a ragtag mix of distant relatives and career criminals. These followers are less in awe of Jesse’s legend than they are afraid of his quick temper and itchy trigger finger. They have reason to be afraid: as Jesse heads into the sunset he doesn’t seem to trust anyone except his wife, Zee (Mary-Louise Parker). And with a huge bounty on his head, why should he?

Though the film is in large part about the odd relationship between Ford, who longs to be Jesse, and Jesse, who proves unable to be the Jesse of legend, it is also about the ways that a mythology can develop and what happens when the man and the myth come to a crossroads.

It is this meeting that drives the film, which is scripted and directed by Andrew Dominik (Chopper) and based on a novel by Ron Hansen. Dominik borrows freely from many cinematic masters, including Sam Peckinpah’s The Wild Bunch (violent men who have outlived their time), Terrence Malick’s Badlands (violent men longing for a piece of fame), and Robert Altman’s McCabe and Mrs. Miller (a peaceful man unable to survive in a violent society.)

Perhaps the loudest echo comes from John Ford’s The Man Who Shot Liberty Valance, in which a newspaper editor tells a senator: “This is the West, sir. When the legend becomes fact, print the legend.” This credo reverberates in the film’s third act, where we witness what happens to Ford after he does his dirty deed.