Last week, the “Magnificent Seven” template wound up in 1950s Los Angeles, as “Gangster Squad.” This week, Howard Hawks’ iconic 1959 John Wayne oater, “Rio Lobo” — which John Carpenter riffed, just as suspensefully, as 1976’s “Assault on Precinct 13” — has been transformed into a modern-day mission to stop a notorious Mexican drug kingpin from making it back to the safety of his native country.

The only thing in his way: the helplessly outnumbered and outgunned citizens in the pokey little border town of Sommerton Junction.

“The Last Stand” marks the American directorial debut of South Korean director Kim Jee-woon, perhaps known on these shores for “A Tale of Two Sisters” and his genre-bending Oriental Western, “The Good, the Bad, the Weird,” which was Korea’s top box-office hit in 2008.

No surprise, then, that Kim would favor us with a variation on a classic American Western known for its blend of suspense, deftly sketched characters and snarky humor (in this case, quite dark at times).

Frankly, Arnold Schwarzenegger couldn’t have selected a better comeback vehicle, at this point in his career. Andrew Knauer’s story — clearly shaped by the earlier Hawks and Carpenter films, with scripting assists from Jeffrey Nachmanoff and George Nolfi — plays to Arnie’s advancing age, while amply demonstrating that movie action heroes never die, they just find more inventive ways to get the job done.

Mind you, this scenario is wholly outlandish and ludicrous, and no laws are broken more than the basic laws of physics. But it’s all in good fun — if unexpectedly gory at times — and you’ll have no trouble embracing Kim’s all-stops-out rhythm.

Events kick off late one evening in Las Vegas, as grim-faced FBI Agent John Bannister (Forest Whitaker) oversees the transfer of drug lord Gabriel Cortez (Eduardo Noriega) via a special prisoner convoy. Borrowing a gag from James Bond’s “You Only Live Twice,” Cortez makes an impressive escape; within minutes, he’s speeding from the scene at 250 miles per hour (!) in a tricked-up Corvette ZR1.

Meanwhile, down in Sommerton Junction, Sheriff Ray Owens (Schwarzenegger) is anticipating a quiet day off. Almost the entire town has emptied to cheer the local football team during an away game, leaving only Owens’ small patrol force and a few regulars at the local diner.

But things aren’t quite as calm as they appear. Owens notices a couple of strangers who seem out of place in the diner; one of them — Peter Stormare, as Burrell — seems oddly smug. Still, it’s nothing more than an idle hunch. Owens has other fish to fry, such as ensuring that two of his deputies — Figgie (Luis Guzmán) and Jerry (Zach Gilford, of TV’s “Friday Night Lights”) — don’t hurt themselves while playing with unusual hardware at the gun museum run by local kook Lewis Dinkum (Johnny Knoxville).

As it happens, though, Owens’ hunch was accurate; Burrell and his colleagues are up to no good. Indeed, they’re constructing a military-style bridge across the nearby canyon, in order to give Cortez a clear path into Mexico. The FBI and Border Patrol will be concentrating their forces at the nearest legitimate highway crossing point, while Burrell and his mercenaries — in order to ensure Cortez has no trouble — intend to kill everybody left in Sommerton Junction.

Goodness.

The forces of virtue are further augmented by Owens’ remaining deputy, Sarah (Jaimie Alexander) and Frank (Rodrigo Santoro), a onetime local golden boy whose life has gone to hell; indeed, he’s currently locked up on a drunk-and-disorderly charge.

Kim and his scripters take their time setting this stage, giving us ample opportunity to bond with these jes’ plain folks. Jerry and Frank are longtime best buds, and the latter has history with Sarah. Truth be told, Jerry appears to be sweet on her as well, but he realizes that she has eyes only for Frank … even if she’s disgusted with him at the moment.

Gilford makes Jerry decent and sincere, if a bit impetuous; his desire for “more excitement” definitely falls into the “be careful what you wish for” category. Alexander is appropriately plucky as Sarah, and I like her heart-to-heart with Schwarzenegger’s Owens, once things have turned nasty.

Santoro is just right as the scruffy loser looking to redeem himself, while Guzmán delivers some gentle chuckles as the stalwart but deeply worried Figgie. After all, Figgie has a point: They are outclassed.

Broad comic relief comes from Knoxville’s Lewis Dinkum, a screwball whose goofy grin always seems to emerge at the wrong time. This part clearly was shaped for the former “Jackass” star, since a deranged stunt involving a streetlight has Knoxville written all over it. Still, Knoxville doesn’t overplay his hand; Dinkum never becomes so farcical that he turns into a cartoon.

Frankly, he seems like just the sort of wingnut who’d settle in a community like Sommerton Junction.

Noriega is just right as Cortez: smooth and suave, with the bearing of a truly powerful and dangerous man who knows that quiet conversation and a chilly smile can be much scarier than grandiose behavior. That said, Cortez has his reckless side: He loves to drive fast cars, hence his chosen means of heading for the border.

Storemare’s Burrell is the vicious, disheveled yin to Cortez’s sleek and sophisticated yang. Burrell is a genuinely nasty piece of work, his favorite weapon a handgun every bit as huge as the one Dinkum likes to carry (and, rather affectionately, has named).

Despite this film’s obvious design as Schwarzenegger’s comeback vehicle, Kim carefully balances all these characters; the result is more ensemble piece than one-man action epic (a very good thing). Schwarzenegger has plenty of time, during the quieter ramp-up to the story’s explosive third act, to establish Owens as a guy who has come to terms with this new, more peaceful life.

Stunt coordinators Darrin Prescott and Wade Allen are kept busy with the Corvette ZR1’s various antics, a few of which — most particularly the method by which Cortez evades a SWAT team — are so far beyond the pale that you can’t help rolling your eyes. Kim and editor Steven Kemper try hard, but we never get a sense that Cortez really is hurtling down the road in excess of 200 miles per hour … although it’s definitely a tantalizing concept.

The film’s otherwise lighthearted tone is marred on two counts: by the number of faceless cops and FBI agents cut to ribbons by excessive gunfire; and by the even gorier maimings, mutilations and flying limbs that punctuate the climactic battle. Kim apparently intends this over-the-top mayhem to be darkly humorous, but I’d argue that he gets a healthier giggle from (for example) an encounter between a serene old biddy and one of Burrell’s goons.

Make no mistake: “The Last Stand” is precisely the sort of exploitative, B-movie thriller that has characterized numerous Lionsgate productions, but there’s also no denying the campy pleasure to be had when a predictable formula is executed so well.

We may know, when a Sommerton Junction bigwig’s beloved red sports car is introduced in Act I, that it’ll get trashed by Act III … but the anticipation — how it’ll be trashed — is much of the fun. And, superficial thrills or no, Kim definitely understands how to keep us involved.

— Read more of Derrick Bang’s film criticism at http://derrickbang.blogspot.com. Comment on this review at www.davisenterprise.com

TheLastStandW

When screwball Lewis Dinkum (Johnny Knoxville, being carried) gets pinned down by gunfire, Frank (Rodrigo Santoro) charges into the thick of battle in a rescue attempt. Things have gotten out of hand in the sleepy little town of Sommerton Junction, and they’re about to get even worse. Courtesy photo