The Three Burials of Melquiades Estrada does many things very well, to the degree that I feel bad I have some complaints. It stars Tommy Lee Jones in his directorial debut, as a ranch hand who fulfills a promise he made to his now-dead friend (Julio Cesar Cedillo) by taking his body back to Mexico for a burial. As the title suggests, this is not so simple as all that, for the corpse of Melquiades Estrada has a good deal of traveling to do before its ultimate resting place: first being buried hastily by his murderer, and later interment in a near-anonymous civic graveyard.

The script by Guillermo Arriaga (of Amores Perros and 21 Grams) opens with some of his customary timefucking although we don't realize it at first. The discovery of Melquiades's body is intercut with Pete's (Jones) memories of his time with his friend, and the arrival of Border Patrolman Mike Norton (Barry Pepper) to the grimy little border town where events unfold. I cannot discuss the film, or even its plot without spoiling what the movie seems to regard as a twist: Norton shoots Melquiades in a moment of panic, and hides his body. We do not see this until about 30 minutes in, and it takes most of that time to realize that the opening scenes are chronologically discontinuous.

In that sense, the script is a marked improvement over Arriaga's work in 21 Grams, where the structure seemed arbitrary and random. Here, the film gives us time to learn about Pete and Norton before plunging them into the plot, while if the story had simply moved straight forward, we would have practically forgotten about Norton while Pete dealt with his friend's death.

Eventually Pete learns the identity of Melquiades's killer, and in short order abducts the patrolman to aid him in transporting the corpse back to Mexico for burial in the tiny town of Jimenez. The movie kicks into gear at this point, and all of the praise you've been reading about how the film taps into the mythos of the Western starts to make sense. Despite what conservatives have decried about the blasphemous Brokeback Mountain, the Western is a uniquely homoerotic genre, packed with depictions of men bonding in the wild, forming deeply codependent relationships, and viewing women as a great destructive force (domesticity is always the enemy of manly friendship in Westerns). Three Burials pushes that into a sort of ultimate by giving Pete a homosocial fixation on a dead body. It's creepy, but more than a little touching. If the Western is ultimately about the relationship between men, Three Burials is a perfect Western: it is about a man going basically to the ends of the earth to fulfill his duty to his friend.

In a way, the film uses this to create a strange religiosity: God exists in this world, in casual way (at any rate God is often evoked, and the film's view of the treatment of the dead is in keeping with the idea that burial is a spiritual necessity). But Pete's religion is Melquiades. He treats his friend's body with the deference of a saintly relic, and the journey to Jimenez is nothing short of a pilgrimage. The translation of mere friendship into something worshipful is not a theme I can remember seeing explored anywhere prior to this film.

Unfortunately, the rest of the film falls short of this central dynamic. Melquiades's living counterpoint, Mike Norton, is a cardboard villain whose redemption is both inevitable and obvious. I suppose that at some point the film was imagined to make a bold statement against the racism of the border patrol, and an argument for the acceptance of illegal immigrants, but it gets...not "lost," because like clockwork, someone will bring it up every time the plot threatens to forget about it, but the film never really says much of anything about the subject.

There are also a handful of subplots that do nothing, particularly the story of Norton's wife Lou Ann (January Jones), who chafes in the impoverished Texas town she has been forced to live in, and the waitress (Melissa Leo) who mentors her when not sleeping with the local male population. I can't tell what this is supposed to add to the main story, if anything, or what we're supposed to think about these women; the scenes fill no real purpose other than to allow for pauses in the main story.

Jones is brilliant in his role, more than earning his Cannes award and that's the problem: Jones-the-director is much too willing to let his leading man carry the film on his shoulders. It's certainly not a poorly directed film, but it's clearly the work of a man who is unaware that there are ways of telling a story other than acting. The town looks dirty and poor, as advertised, but the details of life there are told at us, not shown to us. The film opens up a great deal when Pete, Norton and Melquiades are in the Mexican wilderness, but it's a poor director indeed who can't take advantage of vistas like those.

But despite these nitpicks, the film soars on its central relationship. I can't be sad it didn't get any Oscar notice (although Jones is better than four of the acting nominees, and the script deserved a nod), but it's still one of the better films I've seen from 2005.