South Carolina Republican Katie Arrington invoked President Donald Trump's name early and often in her congressional bid against U.S. Rep. Mark Sanford, pledging her allegiance to the president three times in her first TV ad.

Her gamble paid off. His didn't.

The Trump steamroller that has ended political careers around the country surfaced with a zeal in South Carolina Tuesday, blindsiding Sanford who thought he could survive his primary by playing upon the logic of the average Republican voter.

The veteran congressman and former lawmaker who was considered among the most conservative in the country was defeated by the one sin GOP primary voters couldn't accept: bad-mouthing President Trump.

"What was decisive was that Sanford's 89 percent support of the president, apparently, is not high enough," said Jordan Ragusa, a College of Charleston political science professor who has been researching the #NeverTrump effect on Republican House members.

Sanford joins the ranks of U.S. Sens. Jeff Flake and Bob Corker, in a group of outspoken and departing conservatives who do not think Trump should be the defining feature of the Republican Party.

The Arrington victory came from some of the most conservative parts of the 1st Congressional District, indicating that her Trump support, while a major factor, was not the only one. She won by a margin of 50.56 percent to 46.49 percent, with the remainder going to third candidate Dimitri Cherny.

Arrington bested Sanford in Beaufort County, where he grew up and has a home, by 1,800 votes.

After issuing a pro-Arrington tweet on the afternoon of Tuesday's primary, Trump did a victory lap of sorts, doubling-down on his contention that he was right to issue the 11th-hour endorsement and step in to the South Carolina landscape.

"My political representatives didn't want me to get involved in the Mark Sanford primary thinking that Sanford would easily win - but with a few hours left I felt that Katie was such a good candidate, and Sanford was so bad, I had to give it a shot," Trump wrote.

"Congrats to Katie Arrington!," he also boasted.

Arrington and her campaign said Wednesday they never sought Trump's endorsement but privately hoped for it. Her campaign manager said flatly, "We don't have the president's number."

And yet minutes after Trump's endorsement, Arrington's campaign sent out press releases touting the support and issued a robocall to some 35,000 voters in the district reading the tweet aloud verbatim.

Trump on Wednesday called Arrington to congratulate her. She said they spoke for 10 minutes.

Sign up for updates!

Get the latest political news from The Post and Courier in your inbox.

"He stressed that South Carolina is a very important state and that what goes on there matters," Arrington told The Post and Courier of the phone call.

Trump could look to make it two for two in the state if he chooses to step into the governor's race as well, where he long ago endorsed Gov. Henry McMaster who now faces newcomer Greenville businessman John Warren in a June 26 runoff.

While McMaster did not win his race outright in a five-candidate field, he had a late surge that included a tweet from the president over the weekend. He received more than 40 percent of the vote, a mark that improves his chances in a runoff against Warren. 

Even Warren tries sell to Trump on the trail, telling voters that has more in common with the president than McMaster because he's a political newcomer who runs a business. 

McMaster was first endorsed by Trump last fall during fundraising visit to Greenville. Video clips from the president's speech are staples of ads from McMaster's campaign and a pro-McMaster group. The governor takes every opportunity to tout his support from the White House.

In the state's conservative hub in the Upstate, a dozen Republicans vying to succeed congressman Trey Gowdy all told voters how much they admired Trump's policies and work for his agenda, including building the wall along the U.S.-Mexico border. 

S.C. Republican Party Chairman Drew McKissick said the singular issue for Republican voters in South Carolina is whether or not a candidate stands with Trump. He too saw that as Sanford's weakness as he tried to defend the logic behind his stances and votes.

"There's an old adage in politics that if you're explaining, you're losing," McKissick said.

Reach Schuyler Kropf at 843-937-5551. Follow him on Twitter at @skropf47.

Political Reporter

Caitlin Byrd is a political reporter at The Post and Courier and author of the Palmetto Politics newsletter. Before moving to Charleston in 2016, her byline appeared in the Asheville Citizen-Times. To date, Byrd has won 17 awards for her work.