Editor's note: Adam Hanft writes about American culture, politics, and branding strategies for The Daily Beast, Huffington Post, Slate and others. He is the founder of Hanft Projects, a strategic consulting firm.
(CNN) -- Six tough, don't mess-with-me hombres stride onto the screen, four wearing cowboy hats, none looking like recent readers of "Eat, Pray, Love." One dude stares down the camera and growls, "We're sheriffs in Arizona."
Is this a trailer for a movie about a kick-ass border patrol team after a Mexican gang? No, these are real sheriffs, and they were patrolling Arizonans' TV screens for weeks in the run-up to Tuesday's primary, lending their machismo to Sen. John McCain's campaign.
Well, the John Wayne approach worked. On Tuesday, the longtime senator and 2008 Republican candidate for president easily beat back a primary challenge from J.D. Hayworth.
McCain's message for Arizona -- ground zero for border politics -- was clear: He's no immigration wimp.
We can't be sure whether this is a position the senator deeply and truly embraces, but it was an expedient one that a changed political climate appears to have forced him into.
Some history: McCain has never been an immigration hard-liner; in 2005, he and Ted Kennedy fought and lost in an effort to get a bipartisan reform bill through Congress (sometimes called the McKennedy bill.)
While it failed miserably as legislation, it managed to successfully brand McCain as a border softie. Then came his loss in the presidential election, the emergence of the tea party movement and a primary competitor who was roughing him up as illegal immigration-loving lefty.
McCain's poll numbers tanked, and the Arizona icon who won by nearly 77 percent of the vote in 2004 was looking vulnerable. Some wondered whether he would become a Western version of Sen. Arlen Specter. (Specter of Pennsylvania left the Republican Party because he knew he couldn't fend off a primary challenge).
McCain's primary opponent, Hayworth, is a firebrand conservative. He served in Congress from 1995 through 2007 and was the host of a red-meat talk show until he quit to challenge McCain.
He bottled the populist frenzy that is threatening many moderate Republicans, and given that this was Arizona, he came straight for McCain's immigration jugular.
But by the time primary day rolled around, it was a far stronger McCain than in the early days of the campaign. His zag to the right blocked Hayworth's running room, and his attacks on his opponent's ethics and legitimacy rocked Hayworth on his heels.
True, McCain outspent Hayworth by a factor of 10 to 1. But his victory wasn't just about sheer dollars; in the modern media environment, frequency and familiarity can have as much recoil as a Beretta 96D "Brigadier" pistol, the Border Patrol's weapon of choice.
As someone who both creates and studies messaging, I can tell you that the sheriff spot was political genius, endorsement theater at its best.
If it had been created to establish another candidate's conservative bona fides -- someone without McCain's tough-guy cred -- it would have been perceived as testosterone-washing. But it was believable; you're so engaged in the drama, you don't hear the flip-flopping.
The individual sheriffs -- all identified with their names and jurisdictions -- are straight out of central casting.
Close-ups add to the tension; the cinematography, pacing and editing are tight. The whole effect is gripping. Notably absent from the sheriff parade, though, was Joe Arpaio, the chain-gang loving poster sheriff of hard-line enforcement, who endorsed Hayworth.
The message was tautly framed: McCain versus the president.
Sheriff Paul Babeu says: "President Obama has made protecting our border incredibly difficult. But Arizona has a senator with the courage and character to stand up to a president who is wrong. John McCain.
A president versus a senator.
Doesn't seem like a fair fight.
Unless that senator is John McCain."
Erecting a border fence between himself and Obama was a political necessity for McCain. His opponent relentlessly linked them.
In fact, one Hayworth spot reached back to the McKennedy legislation; the commercial cuts from footage of McCain proudly proclaiming his authorship of "comprehensive immigration reform" with Kennedy, to the president saying "I stood with Ted Kennedy and John McCain."
But McCain did more than prop up his border bravado; he also went on the attack -- a preview, undoubtedly, of the fight that his Democratic challenger will face in the general election. One negative spot went after Hayworth for becoming a "registered lobbyist" after losing his seat.
Noticeably absent from McCain's spots, though, was any "maverick" or "straight talk" rhetoric. That was wise -- it would have merely evoked the late-night TV joke-fest that those phrases became during the 2008 campaign.
The votes are in. The sheriffs spot -- and an entire campaign apparatus that had to relegitimize the senator's conservative acceptability, including an endorsement from Sarah Palin -- did the job.
But it's a profound comment on where Republican politics stand in 2010 that John McCain had to run against a new challenger by also running against his old principles.
The opinions expressed in this commentary are solely those of Adam Hanft.