The title doesn’t lie: “Cowboys & Aliens” pits rifles against ray-guns in a showdown that pulverizes a lot of prairie.

Even more excitingly, it ropes in Harrison Ford and Daniel Craig, cinematic icons from two eras, to square off in a sort of rumble between growlers: Ford’s voice has taken on the vaguely threatening sound of distant thunder over the years, while Craig’s low, rumbling cadences careen between late-night DJ and mild earthquake. It’s an inspired match-up that sparks an enjoyably offbeat adventure.

Mixing science-fiction and shoot-’em-ups is nothing new, but please don’t mistake “Cowboys” for Will Smith’s woebegone “Wild Wild West.” While “Cowboys” has moments of humor, it never degenerates into a self-aware, goofy spoof and, because both Craig and Ford know how to get low-key laughs, the jokes click.

It took a posse of screenwriters to adapt Scott Mitchell Rosenberg’s graphic novel, but the movie maintains a pleasantly consistent mood. Some portion of the credit for that must go to director Jon Favreau (“Iron Man”), who knows when to build the tension and when to break it.

FILM REVIEW

‘Cowboys & Aliens’

3 out of 4 stars

Rated: PG-13 for intense sequences of western and sci-fi action and violence, some partial nudity and a brief crude reference

Cast: Daniel Craig, Harrison Ford, Olivia Wilde, Sam Rockwell

Director: Jon Favreau

Running time: 118 minutes

From the beginning, Favreau makes it understood “Cowboys” isn’t going to be one of those dreaded wacky Westerns we all know and hate. A dazed and disheveled hombre (Craig) awakens in the sagebrush to find he’s got an oozing laceration in his side and an unbreakable, chunky bracelet on his wrist.

How he got these things he cannot recall, although he certainly remembers how to protect himself, as he demonstrates when he brutally makes short work of a group of would-be bounty hunters who suspect he’s an outlaw.

In the hamlet of Absolution, he learns he is, in fact, a wanted man: He’s Jake Lonergan (his name is practically a mash-up of “loner” and “gun”), who’s being sought for robbing stagecoaches, arson and the slaying of a prostitute.

The local sheriff (a letter-perfect Keith Carradine) locks up Lonergan, but justice will have to wait to be served once some other strangers roll into town — in what appear to be enormous metallic dragonflies. Perhaps trying to adhere to the “when in Rome” rule, these intruders lasso a large portion of the population and sweep them (literally) off their feet, whisking them into the skies.

This unexpected rustling of the residents makes unlikely partners of Lonergan and the surly, wealthy and powerful cattleman Dolarhyde (Ford), whose bratty son (a terrifically obnoxious Paul Dano) was among the aliens’ captives. With assistance from a good-hearted saloon owner (Sam Rockwell) and a mysterious beauty named Ella (Olivia Wilde), Lonergan and Dolarhyde embark on a rescue mission.

The storyline doesn’t offer many surprises, and the mundane motive behind the extraterrestrial invasion is disappointing as well. Several sequences unfortunately invite direct comparisons with the similarly themed “Super 8,” and “Cowboys” comes up slightly short.

Still, there’s some first-rate fun to be had as the sparks of machismo fly back and forth between Dolarhyde and Lonergan; the cold-blooded looks exchanged by Ford and Craig would make Clint Eastwood proud. The movie happily avoids the typical trap of becoming a mindless, noisy avalanche of explosions and fireballs because Favreau never allows the characters to stay out of sight for long — and Craig and Ford don’t permit us to forget who’s at the center of the action.

As for the otherworldly creatures the heroes eventually face, they are delightfully disgusting. Created by Greenville native Shane Mahan, they have crab-like body armor, monstrous turtle faces, shark-style jaws and concealed appendages reminiscent of the three-fingered Martian “hands” in the 1953 version of “War of the Worlds.”

That’s not the only clue that “Cowboys” was created by (and for) geeks. There are also semi-subtle references to the original “Mighty Joe Young,” “Shane,” “The Searchers” and even a few tributes to the “spaghetti Westerns” of the 1960s, as director of photography Matthew Libatique occasionally tweaks the color to outrageously bright tones, turning Craig’s expressive azure eyes into what may be the movie’s most startling visual effect.