Lindsey Graham and Donald Trump

President Donald Trump greets Sen. Lindsey Graham, R-S.C. (front left), and Sen. Chuck Grassley, R-Iowa, as they meet to discuss immigration in the Roosevelt Room in the White House on Jan. 4 in Washington. Andrew Harnik/AP

For months, U.S. Sen. Lindsey Graham worked methodically to build credibility with a president he once feuded with regularly. He courted Trump on the golf course and on Air Force One. He extolled the president's national security team. He worked closely with Trump on a last-ditch health care reform effort.

But when Trump allegedly derided African immigrants during an Oval Office meeting this month, Graham did not hesitate to challenge him.

"America is an idea, not a race," Graham said in a combative back-and-forth.

In an interview with The Post and Courier days later, Graham said he saw no contradiction between his efforts to cozy up to the president and their vocal disputes.

"I will work with him and I will stand up to him," Graham said. "I will do both."

That tough love approach to handling the unpredictable president follows a familiar pattern from top South Carolina Republicans under the Trump administration. At a time when many Republicans have opted for a with-him-or-without-him, zero-sum mentality, several of the most prominent Palmetto State conservatives have sought a delicate middle ground. 

U.S. Sen. Tim Scott helped lead efforts to pass a tax overhaul through the Senate and hailed Trump's involvement in the process.

But after a white supremacist rally in Charlottesville, Va., turned violent last year, the North Charleston Republican voiced concerns about how Trump's ambiguous response blaming both sides compromised his "moral authority" and counseled the president in a one-on-one Oval Office meeting.

Former S.C. Gov. Nikki Haley has championed Trump's foreign policy in her role as ambassador to the United Nations, winning plaudits as one of the most successful members of the president's Cabinet.

But when several women accused Trump of a history of sexual assault, Haley defended the accusers' right to be heard and praised their strength for coming forward.

Trump Haley (copy)

President Donald Trump, sitting next to U.S. Ambassador to the U.N. Nikki Haley, speaks during a working lunch with ambassadors of countries on the United Nations Security Council and their spouses in April in the State Dining Room of the White House in Washington. File/Susan Walsh/AP

It's a high-wire balancing act that can yield significant rewards if navigated successfully, but there's also the danger of inflicting critical damage with a wrong turn.

Josh Kimbrell, an Upstate conservative radio talk show host and chairman of the Spartanburg GOP, paraphrased a biblical proverb to explain the approach Graham, Scott and Haley have pursued: A wound from a friend can be trusted but the flattering tongue of an enemy can't. 

“People with aggressive personality types like Trump respect strength," Kimbrell said. "If you shift with the sand, you’re just going to be a lackey. Nobody like suck-ups."

Fearful of the potential consequences from crossing Trump, many Republicans have strenuously avoided so much as mildly critiquing the president. No GOP lawmaker wants to wake up to find they have landed in the president's crosshairs on Twitter.

In South Carolina, where full-contact political combat is a favorite pastime, lawmakers are less afraid to take risks. 

"The rough and tumble nature of our politics means that when we get somebody elected they've got pretty thick skin," said Dave Woodard, a GOP strategist and Clemson University political scientist who has advised many Republican campaigns in the state, including Graham's. "So when they get into a national fight it doesn't feel uncomfortable for them."

At the same time, the trio appear highly cognizant of this strategy's limits, experts say.

“They seem to be walking that line between speaking out when they see an injustice or something that needs to be said but avoiding a major Twitter war with the president in the way that (Sens.) Jeff Flake or John McCain or other Republicans have," said Gibbs Knotts, a political science professor at the College of Charleston.

Graham has steadfastly declined to offer any detailed retelling of that now-infamous Oval Office meeting that dramatically shifted the immigration debate. When asked why, he does not hide that he is calculating the limits of his insubordination.

"I want to make sure I can keep talking to the president," Graham said on CNN.

Will those battles cost the senators with South Carolina voters?

Sign up for updates!

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

"Trump carried this state by a large margin, so usually you'd think that state politicians would be afraid of him," said Woodard. "But they seem to have enough confidence in the electorate and their reputation with them that they feel they don't need to play ball with the president all the time."

Trump Scott meeting in 2017

U.S. Sen. Tim Scott and President Donald Trump discuss race relations in an Oval Office meeting at the White House in September. File/Shealah Craighead/White House/Provided

That attitude has run consistently through the state's foremost politicians for decades, longtime observers say.

When Katon Dawson, a former South Carolina GOP chairman, spent a summer during college driving around then-Sen. Strom Thurmond, he asked about how he approached all the presidents that had come and gone during the course of his decades-long political career.

"I don't need to make friends with them, I just need to do business with them because I'm going to be around a lot longer than they are," Dawson recalled Thurmond saying.

Graham has experience handling backlash. The Seneca Republican stared down a crowded six-candidate GOP primary field in his 2014 reelection battle and emerged unscathed, befriending potential rivals and aggressively making his case too.

That experience, Woodard said, may have taught Graham that he can stick to his gut instincts and weather whatever headwinds those instincts produce when the time comes.

To be sure, S.C.'s congressional delegation also features GOP lawmakers on both extremes. U.S. Rep. Jeff Duncan of Laurens, for example, has cheered almost every single move Trump has made since taking office, whereas U.S. Rep. Mark Sanford of Charleston has rarely refrained from criticizing the administration when he sees fit.

But those who have enjoyed the most influence in Trump's Washington have deployed a measured dose of both.

"It’s what Republican primary voters expect from our elected officials," said Dawson. "They expect that frankness, and they really reward that maverick angle. They'll boo you and cheer you in the same week, but they love a good fight."

Follow Jamie Lovegrove on Twitter @jslovegrove.

Jamie Lovegrove is a political reporter covering the South Carolina statehouse and congressional delegation. He previously covered Texas politics in Washington for The Dallas Morning News and in Austin for the Texas Tribune.