The western doesn’t get much play these days. It’s a genre that’s losing ground to the candied thrills of the multiplex, but when a production strolls along that’s worth the price of admission, it’s something to celebrate. “Appaloosa” is such a film: a carefully metered story of frontier justice, anchored with unusually evocative moments of companionship and invigorating character development.

Arriving in the town of Appaloosa, hired guns Virgil Cole (Ed Harris) and Everett Hitch (Viggo Mortensen) assume the role of the law to protect the locals against the outside influence of Randall Bragg (Jeremy Irons) and his vicious gang. Settling into town, Virgil and Everett meet Allison French (Renee Zellweger), a polite piano player with designs on both men to suit her needs of domestic comfort. Trying to retrieve Bragg from his compound on murder charges, the gunslingers find the situation complicated by corruption and newfound vulnerability, stunting the professionalism of the men in ways they’ve never encountered before.

Camaraderie is a quality most westerns shun. The iconic pose of the outlaw, with a scowl burned across his face and a six-shooter affixed to his palm, is a prevailing, forbidding image, meant to launch hundreds of stories that articulate the power of the prairie loner. “Appaloosa” is an atypical story of friendship imparted through knowing glances and teamwork, showing how Virgil and Everett exist together not just has partners protecting the innocent for the highest bidder, but as men who genuinely enjoy each other’s company, to a point where they finish each other’s sentences. It’s a fascinating character study born from Robert B. Parker’s novel and translated through Ed Harris’s unusually secure direction, his first effort since 2000’s uninspired art world bio-pic “Pollock.”

Encrusted with cowboy trappings of all shapes and sizes, shot on gorgeous New Mexico locations, and stuffed with enough classic grit to satisfy the purists, Harris lends “Appaloosa” a pure oater heart. Deceptively arranged as a straightforward tale of desire and revenge in the old west, the picture is instead flush with intricate impulses for the characters, who aren’t traditional one-dimensional figures of discontent, but curious, worrisome folk who try to manage a life amidst larger portraits of injustice and murder. Harris opens wide for his actors, slowing the film’s pace to absorb subtle instances of emoting and reaction, deepening the film with an amazing concentration on idiosyncrasy.

Virgil and Everett are tough men, but they’re not heroes. Harris doesn’t paint the duo as knights, but as two fellows stumbling across a feeling of domestication in Appaloosa that’s foreign to them. The financial benefits bring them to town, but French’s flirtations help convince them to stay, at least in Virgil’s case, who assumes custody of French and protects her as he would the threatened populace. Everett is the mumbling Greek chorus of the film, cautious with his thoughts, but blessed with lucidity as he confronts the possible end of his long union with Virgil. It might be unfair to suggest such a feeling, but there’s a distinct homoerotic “Brokeback Mountain” handle to the relationship that Harris never indulges, but doesn’t exactly push away from either. These are intimate friends without the burden of confession; their body language is the only communication they need to keep peace on the job and in their hearts. It goes without saying that Mortensen and Harris are tremendous as both shoot-first lawmen and vulnerable souls, both actors gifting the screen dense performances built on exhilarating restraint.

When push does come to shove, Harris stages a few brutal gunfights, rooted more in unpredictability than the stuff of classic showdowns. The bursts of gunfire help to raise alarm in “Appaloosa,” keeping the audience guessing over who will manage to survive the ferocious effort to bring Bragg to justice. Harris builds tension masterfully, and his payoffs have a unique edge to them that land the film a few wicked curveballs.

“Appaloosa” is sure to delight the die-hard fans of the genre. Harris respects the traditions of the western while maintaining his own dramatic interests, enhancing the picture further. However, it’s a slow ride for the average cowpoke, with a languid pace meant to reflect the era and to make time for bottled emotions to boil over. Harris’s adoration for the genre is clear, and his “Appaloosa” is a fine addition to a growing list of neo-westerns incorporating a respectful tone, ideal aim of violence, and heartfelt observation all in the same breath.