Associated Press

GREENVILLE, S.C.—Kicking the crap out of the Tea Party is the most fun Senator Lindsey Graham has ever had.

"More fun than any time I've been in politics," Graham tells me at the YMCA here, where he's about to address a couple dozen supporters. Little kids are streaming through the halls to their gym classes, and a smell of sweat hangs in the air. "Because people are being uplifting," Graham continues. "People are really saying, 'OK, enough already.' They're starting to push back from trying to define conservatism in a fashion where there is no room for solving problems."

Ever since the rise of the Tea Party, Graham—a politician who seems to delight in sticking his finger in the eye of the Republican base—has been on the front lines of the struggle for the soul of the GOP. For years, right-wingers have heckled him and called him names. But now he is having the last laugh. Facing six no-name opponents in Tuesday's primary, Graham needs 50 percent of the vote to avoid a runoff, and he is confident he will get it.

"This has turned into a referendum not just on me, but on you, right?" Graham tells his supporters. Winning the primary outright, he says, "will not only get me back to the Senate. It will legitimize everything I've tried to do for you. It will be a statement heard all over the country—a statement about the Republican Party moving forward, not backward."

On paper, Graham is the right wing's juiciest target. An unapologetic champion of bipartisanship and compromise, he has worked with Democrats on initiatives such as immigration reform and climate legislation. Conservative blogs and talk radio have nicknamed him "Flimsy Lindsey" and "Grahamnesty." Even as South Carolina has turned into a right-wing hotbed—with a Tea Party-aligned governor and legislature and perhaps the country's most right-wing congressional delegation—Graham has refused to follow his party's rightward drift. He has been censured by nine separate South Carolina county GOP organizations and heckled at his state party convention. For years, a local activist has driven around with a Graham effigy stuffed headfirst into a toilet, leading a brigade of self-styled "RINO hunters." In 2012, the president of the Club for Growth said Graham would be the fiscally conservative group's top target this year.

To say that threat has failed to materialize would be an understatement. The Club and other national conservative groups have quietly abandoned the race as Graham's challengers failed to get traction. As I followed Graham on the last day of his primary campaign, a whirlwind five-city tour, it became clear that this was a man not content merely to eke out victory against a rival faction of the party. He wanted to humiliate them, and in so doing, to deliver a public rebuke to those who might have thought they could make him an example. 

"I'm trying to tell the Tea Party, I understand your frustration, but being frustrated is not enough," he tells me. Republicans are only doing well at the moment, he believes, because Democrats have overreached. The public is turning against the president and his party because of Obamacare and what Graham sees as an over-the-top liberal agenda. But Republicans will not keep voters' loyalty unless they begin to offer a positive alternative. "I know Washington is broken, but what's broken about it is everybody yelling and nobody trying to fix it," he says. "I'm trying."

Graham is small, wiry, and energetic, with bulging blue eyes in a round, ruddy face topped with bristly, spit-combed hair. His bared-teeth grin and frenetic manner give him the affect of a high-spirited French bulldog. Graham was raised in the small upstate town of Central, where his family lived above their pool hall and liquor store. When he was in college, his parents both died unexpectedly a year apart, leaving him to help raise his sister, nine years his junior. He eventually became her legal guardian, and she remains his closest friend and confidant. She also appears in television ads testifying to his character. "I never had any doubt that Lindsey would take care of me," Darline Graham Nordone tells me. Her name is spelled "Darlene" on her birth certificate, but when she was learning to spell, "Lindsey taught me to spell my name D-A-R-L-I-N-E," so that's still how she spells it.

In its final days, Graham's primary campaign has attracted little media interest, which makes sense for a one-sided contest that appears to be a foregone conclusion. Yet it may be the most significant race of the 2014 Republican primaries. If the story of this year's primaries has been the resurgence of the Republican establishment and the diminished might of the Tea Party, the best illustration of it is Graham escaping unscathed.

Just as important as the escape is way he has done it—a combination of clever politicking and pugnacious defiance. Unlike Mississippi Senator Thad Cochran, a 36-year veteran who was forced into a runoff with a conservative challenger last week, Graham left nothing to chance. ("I'm at a different stage of my life than he is," Graham said when I asked him about Cochran, adding, "I've been planning for a hard contest for two years.") He raised $13 million and seeded a formidable campaign operation, with more than 5,000 precinct captains and six field offices around the state. Through a combination of intimidation and enticement—as when he helped a conservative congressman, Mick Mulvaney, get a seat on the House Financial Services Committee—he kept the most prominent potential opponents out of the race. His six challengers include a state senator and five candidates seeking their first elected office; combined, they have raised about $2 million.

Graham has also refused to change his ideological stripes. Though his opponents blast him as an election-year conservative, he has been remarkably consistent, saying he believes voters will reward sincerity above opportunism. On the stump, he frequently holds forth about how the Republican Party needs to change to attract new voters. He is more likely to mention his crusades conservatives hate, such as immigration reform and his votes for President Obama's Supreme Court nominees, than those they admire, like his harsh criticism of the administration's actions in Benghazi and in the recent prisoner exchange for Bowe Bergdahl. When I asked him about a recent remark that the Bergdahl deal could lead to calls for Obama's impeachment, he rushed to clarify that he didn't believe impeachment was merited and that while the swap was "a dumb and dangerous decision," the administration was probably within its rights not to notify Congress.

There is, to be sure, some recalibration: Graham's campaign literature highlights his past criticism of Obamacare and his support for a doomed piece of legislation that would allow states to "opt out" of the law. But when I ask him what he would do about Obamacare now, he frankly admits that it can't be repealed without a Republican president, and proposes working with Democrats on "reforms" that would "lessen the burden on business" while keeping such features as the ban on preexisting-condition discrimination and allowing young adults to stay on their parents' insurance. Nor has Graham only recently moved to the middle. Back in 1998, as a second-term congressman, he was the only Republican on the House judiciary committee to vote against any of the Clinton impeachment articles, memorably posing the question, "Is this Watergate or Peyton Place?"

The principal message Graham hopes to send with his expected victory, it turns out, is not directed primarily at the right wing of the party at all. It is a message for his fellow Republican officeholders, who have often been more inclined to cower and appease the Tea Party than to fight it. "Somebody, somewhere, had better up their game, because our country is going in the wrong direction," he says. "And if it's not me, who's it going to be? Why should I hide in a corner because it's hard and somebody may not like it?"

If he wins, Graham tells me, "What you have seen here is that silent majority of the Republican Party expressing themselves—the people who don't stay on the Internet 24 hours a day telling you what you can't do. I've tapped into something here, and I hope Republicans understand it."

* * *

As I head to the Beacon Drive-In in Spartanburg, a local landmark known for its greasy fare and lighthouse-shaped sign, local talk radio is abuzz, as usual, with antagonism for Graham. Russ Cassell, the host, is hopefully wondering if the Graham campaign's blitzkrieg actually means the senator might be in trouble, despite polls showing him hovering on the brink of 50 percent and none of his opponents breaking double digits. 

A caller who identifies himself as Neil comes on the air. "I don't believe Lindsey Graham's a true Republican," he says. "I don't even believe he's just a RINO," or Republican in Name Only. "I believe he's a Democrat." Neil is supporting Lee Bright, a state senator from Spartanburg who has proposed allowing the state to mint its own currency and compared the IRS to Hitler's Brownshirts.

Bright was second to Graham at 9 percent in the latest poll, but he doesn't seem to be campaigning the day before the election. Instead, I'm headed to the Beacon to see Bill Connor, who has registered between 1 percent and 4 percent of the vote in recent surveys. A podium is set up in the solarium-like fast-food dining room, and exactly four people are in the audience, including his son and three devoted supporters. 

Connor believes the government has been infiltrated by the Muslim Brotherhood and that profligate foreign aid is to blame for the national debt. He would like to eliminate the federal departments of education and labor. In addition to closing the borders and cracking down on illegal immigration, he wants to reduce the number of legal immigrants. Midway through his speech, he whips out his pocket copy of the Constitution.

When I talk to Connor, he seems somewhat bewildered by the way the campaign has unfolded. Back in February of 2009, he was a speaker at the state's first Tea Party rally. A couple of months later, he introduced then-Senator Jim DeMint on the steps of the statehouse as a crowd of 10,000 cheered. As a first-time candidate, he ran for lieutenant governor in 2010 and surprised the political establishment by raising more than $600,000 and coming in second in a crowded primary field.

These days, Connor can't figure out where his erstwhile allies went. The Tea Party passion, he acknowledges, isn't what it once was. "When something's new, there's an initial burst of interest," he says. "I think we've also been redefining, in a way, what is the Tea Party?"

Connor and the other Graham opponents haven't gotten any help from the national activists that have powered Tea Party candidates elsewhere. National Tea Party groups are silent, as is Sarah Palin, whose endorsement helped power a little-known conservative lawmaker, Nikki Haley, to the South Carolina governorship in 2010. (A Palin endorsement would have been seen as a swipe at her onetime running mate, John McCain, with whom Graham enjoys a high-profile bromance.)

Connor is especially annoyed with Fox News, where Graham frequently appears but none of his challengers has gotten prime-time airtime. He also wishes the local media would quit calling him an "Orangeburg attorney," which, OK, is what he is now, but he would like the emphasis to be on his service as an Army Ranger in Afghanistan.

The last hope for Connor and the other candidates is to force Graham into a runoff, which would spotlight a single opponent and potentially unify anti-Graham conservatives. Connor and two other candidates, Bright and Richard Cash—a businessman whose roadside signs say, "Replace Lindsey!"—have signed a pledge to support whichever one makes the runoff. "I don't care who they vote for to get Graham out," Connor says. "This is not about individuals."

I stop by a nearby table to see if the diners caught any of Connor's message. They have no idea who he is and what he's running for. "I don't vote," one tells me.

* * *

Graham is not worried about a potential runoff: "I'd hate to be the guy in a runoff against me." We are in Seneca, where he lives and still returns most weekends, driven by an aide in a beat-up Ford Crown Victoria with more than 250,000 miles on the odometer. A confirmed bachelor who denies the rumors he is gay ("I know it's going to upset a lot of gay men," he has joked), Graham acknowledges he has no life outside of politics. On Monday evening, his campaign is serving chili dogs under a park shelter along the town's Main Street while a folk trio harmonizes to "Man of Constant Sorrow."

At every one of Graham's campaign stops, I find Republicans who've been chagrined at the sudden rise of the right and now want their revenge. They bemoan the Tea Party as "extremists" and "wackos," and wonder what has happened to their party. There's the former chairman of the Spartanburg County GOP, Rick Beltram, who was ejected after 10 years' service when he resisted calls to censure Graham. There's an Anderson County councilman, Tom Allen, who's fending off a primary challenger who accuses him of being too accommodating.

In Seneca, I meet a retired Clemson University geology professor named John Wagner, who tells me, "Some parts of the Republican Party just went weird. I don't know how else to describe it." Of Graham's challengers now, Wagner says, "They'd go up there and start filibusters, introduce bills with no chance of passing, talk a lot and get nothing done." He adds, "Do you want to run a country, or do you want to start a new religion?"

This is a common sentiment among Graham's supporters, and he hopes that by channeling their sentiment, he can prove there's more of an appetite for moderation in his party than has previously been thought. Onstage in Seneca, Graham is talking about the need for a path to citizenship for undocumented immigrants and more legal immigration. "Whether you believe it or not, there are a lot of jobs you can't find American workers to do," he says. "Just travel around with me—I can prove it to you."

He talks about another one of his legislative passions, entitlement reform, and expresses his desire for a new Contract With America to show people that Republicans have a constructive plan for the country. "I know exactly what we need to do," he says. "The question for the country is, are we going to let politicians do what we need to do? Or are we going to fire everybody who tries to solve a problem? If we do, you'll get more of nothing."

There are about 300 people here, mainly older and white—an impressive turnout for a Senate candidate in a small town in an election a recent poll found only one-fifth of the electorate even knows is happening. They may not be marching or waving yellow flags, but to Graham, they are the GOP's true grassroots groundswell—the revenge of the moderates.

"I am looking forward to having the people of South Carolina in the Republican Party speak tomorrow night, because here's what they're going to say," he says: "Lindsey, keep on being Lindsey!"

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.