Mark Sanford is a political survivor like few others.
As governor of South Carolina, he disappeared from the state and infamously claimed to be "hiking the Appalachian Trail" in 2009 when he was instead carrying on an extramarital affair in Argentina.
That scandal ended Sanford's marriage but he rode out the political storm and finished his second term in 2011.
Then against all odds, the Republican won a special election in 2013 and returned to the House of Representatives where he had first served in the 1990s.
But in Tuesday's GOP primary, Sanford faces what is perhaps his toughest electoral test yet — largely thanks to his vocal criticism of President Trump.
His challenger, state Rep. Katie Arrington, has made Sanford's lack of support for Trump the central message of her campaign.
In one ad, Arrington cheekily alludes to Sanford's past scandals, speaking to the camera as she's hiking herself.
"Mark Sanford and the career politicians cheated on us," she says. "Bless his heart — but it's time for Mark Sanford to take a hike — for real this time."
In a debate earlier this month, Arrington hammered home that point again, arguing she would be a loyal foot soldier for Trump in ways Sanford hasn't.
"Mark Sanford has spent the better part of two years bashing our team captain, President Trump, on CNN," she said. "He's made it his actual job."
Sanford, who's carved out a more libertarian perch in the House and is often prone to philosophical musings, pushed back that he saw his role as a representative differently — to listen, first and foremost, to the people, not to the president.
"We gotta ask ourselves, who's the captain? And I would argue, at the end of the day, every one of you are. That I believe in an inverted political system. I believe that power and authority ought to rest at the most local level possible," Sanford said.
Sanford hasn't been shy at voicing his disgust with Trump and his distaste for the president's brash style of politics and frequent bending of the truth.
After a shooting at a congressional baseball practice last year, that almost took the life of Majority Whip Steve Scalise, R-La., Sanford went on MSNBC and said that Trump was, in part, to blame for the decline in political discourse in the country.
"I would argue that the president has unleashed — it's partially, again, not in any way totally — but partially to blame for demons that have been unleashed," Sanford said.
In February 2017, he told Politico Magazine he was unimpressed with Trump "because at some level he represents the antithesis, or the undoing, of everything I thought I knew about politics, preparation and life."
Sanford also acknowledged in that interview that "people who live in glass houses can't throw stones," and that he'd had his own problems with fidelity — namely the very public downfall of his marriage after his own affair.
After his wife and closest political adviser, Jenny Sanford, divorced him, he nonetheless won his House seat, representing the Charleston-based 1st Congressional District, which stretches along the Atlantic coast. And onetime Sanford allies point out that despite his sometimes unconventional approach to politics, he's nevertheless won every race he's ever run thus far, dating back to his first House race in 1994.
Even with that record, this Tuesday's primary is Sanford's most serious challenge by far, said former South Carolina Republican Party Chairman Matt Moore, who previously worked for Sanford. Arrington is well-funded, putting some of her own money into her campaign, and has run a vigorous race against Sanford.
"But, he always wins. So despite curious things he might have said about President Trump or previous troubles while he was governor, he just keeps winning," Moore said.
Local observers note that district is less conservative than others in the state due in part to many transplants to the area in and around Charleston. So seizing on Sanford's anti-Trump comments may not have as much resonance as Arrington hopes for.
"[Sanford] has always been perceived as a maverick who thinks independently, so it's kind of consistent with his persona to take that position" against Trump, said Larry Kobrovsky, the Charleston County GOP chairman, who considered challenging Sanford at one time.
During the campaign, Sanford hasn't apologized for his comments about Trump but he has pointed out that, policy-wise, the two still overwhelmingly align.
"Have I disagreed with the president some? Yes. Have I been up front about that? Yes. But I've been equally up front in the overwhelming number of my votes in being with the president and being with the Republican Party," Sanford pushed back during his debate with Arrington.
But in the era of Trump, that hasn't been enough for other politicians. Just last week, Republican Rep. Martha Roby of Alabama was forced into a runoff due to her own criticism of Trump. And prominent Trump critics like Tennessee Sen. Bob Corker and Arizona Sen. Jeff Flake decided not to run for re-election given the current direction of the Republican Party.
Gibbs Knotts, the chairman of the political science department at the College of Charleston, says it's a trend in this year's primaries.
"It seems like it's the cardinal sin amongst primary voters, particularly primary voters in certain parts of the country," said Knotts. "If you speak out against Trump, and if you're anti-Trump, or not 100 percent behind him, for a Republican in the South, that can be a really difficult situation."
Sanford could well find himself in that same scenario on Tuesday. A poll released last week showed the incumbent in a virtual tie with Arrington with plenty of voters still undecided. Because there is a third candidate on the ballot, if neither candidate tops 50 percent, the top two finishers will face off again in a runoff in two weeks.
Copyright 2018 NPR. To see more, visit http://www.npr.org/.