Just months after offering himself as the voice of Republican opposition, South Carolina Senator Lindsey Graham has been following the president around like a dog, as Donald Trump might put it, palling around with him on the golf course and talking him up on teevee like a faithful surrogate.

“I am still trying to figure out what turned Lindsey Graham from a patriot and man who put country over party into a stooge for Trump,” AEI’s Norm Ornstein tweeted after Graham, together with fellow Republican Chuck Grassley, lodged a criminal referral last Friday asking the Justice Department to investigate Richard Steele, the former British spy and author of the dossier dat the heart of the Russia investigation.

“It’s one thing to play golf a couple of times, you can make the case, the guy is president and you might temper some of his insanity by flattering him,” Ornstein told the Daily Beast. “But when you begin to act as an enabler to scotch, block or discredit the Russia investigation, that takes it to another level where you become an accessory in the obstruction of justice.”

Graham has long been a favorite of Washington pundits for his strong intellect and savvy legislative mind masked by a good ole boy drawl and enhanced by a storyteller’s knack for communicating. His best friend in the senate is John McCain.

Those confounded by Graham’s sudden descent into cravenness may have gotten a piece of the puzzle Tuesday when President Trump seemed to side with Graham on the need for quick action on DACA (Deferred Action for Childhood Arrivals) that would legalize some 800,000 immigrants brought to the United States as children, and also for broader immigration reform with a path to citizenship.

With the cameras rolling, Graham told Trump that the Senate had passed three comprehensive immigration bills in recent years with over 65 votes, only to have them die in the House. That will happen again, he told Trump, when right-wing radio and TV “beat the crap out of us” and say it’s “amnesty.”

“ Trump is the easiest guy in the world to manipulate. You kiss his ass and keep kissing his ass. Anything other than that, and he will turn on you. ”

Sixty-two percent of Trump voters support a pathway to citizenship for the DACA kids, Graham said, “You have created an opportunity here, Mr. President, and you need to close the deal.”

Trump seemed to relish the looming fight, declaring, “I will take all the heat you want to give me,” adding “My whole life has been heat. I like heat, in a certain way.”

Who knows whether Trump will follow through, or whether he’ll be pulled back into the familiar confines of partisan politics. Still, for the moment it appears a lot less mysterious why Graham is choosing to buddy around with this most unconventional president after calling him a “jackass” and declaring in 2016, “If we nominate Trump, we will get destroyed…and we will deserve it.”

Trump relished the fight then too, calling Graham a “lightweight” and an “idiot,” and reading aloud his cell phone number at a rally in South Carolina, saying he got it after Graham “begged” him to put in a good word for him with Fox anchors as he angled for more air time. After Graham’s 2016 presidential bid fizzled, he endorsed Jeb Bush, then Ted Cruz.

Graham isn’t up for reelection until 2020, but when it comes to Trump, it’s not too early to take out an insurance policy.

“He doesn’t want to be Luther Strange (defeated Alabama senator) who gets swept away by a tide of Trump voters,” says a former senate staffer familiar with the ways of politicians with reelection on their mind.

Graham has never been that popular in South Carolina. He works across party lines, and he’s a big booster of immigration reform with a path to citizenship, not a crowd pleaser in GOP circles. He expected a strong challenge in 2014, and worked hard to avert it, in the end winning easily, but he’s not taking anything for granted in 2020, when he next faces the voters.

“He has to get Trump on his side,” says the former senate staffer. “He could be worried about a really dirty campaign. He can’t wait until 2019 to do his suck up.”

Whether he wants to be reelected or perhaps run for governor, Graham is smart enough to know it will be a lot easier with Trump on his side than working against him. So far, no one who is anti-Trump has gone on to another electoral career, though Mitt Romney is hoping to buck that trend in Utah.

Republicans who tangle with Trump (think Senators Bob Corker and Jeff Flake) end up walking away with little to show for it save their dignity. Romney surrendered his dignity when he angled for the job of secretary of state, only to discover Trump had played him.

“Lindsay Graham is shameless, but he’s not a moron,” says the senate staffer. “Trump is the easiest guy in the world to manipulate. You kiss his ass and keep kissing his ass. Anything other than that, and he will turn on you.”

Asked on Meet The Press Sunday why he’s suddenly so cozy with Trump, he replied: “Because he's president of the United States, he's going to make a decision about immigration, I've been working on for a decade. He's president of the United States, going to make a decision about North Korea, which is one of the biggest threats to the world at large. He's going to decide whether or not to stay in the Iranian agreement. I've enjoyed his company. He beat me like a dog . I've said everything I know to say about him. I used every adjective on the planet. I lost, he won. And I feel an obligation to help him where I can. I've enjoyed working with him. I don't think he's crazy. I think he's had a very successful 2017. And I want to help him where I can. And we should all want him to be successful. He's got a lot on his plate.”

Watching this virtuoso performance, Paul Equale, a lawyer and longtime Democratic activist, told the Daily Beast he thinks Graham is positioning himself with Trump to be the truth teller, the figure who has the stature and the personal relationship to go to the White House and tell the president it’s time to go like Senator Barry Goldwater told Richard Nixon in 1974.

That’s not Graham’s only game, Equale hastens to add. There’s only one president at a time, and Graham would rather be next to him, pushing for his principles and ideas, than on the outside throwing rocks.

The Steele criminal referral is “what floats Trump’s boat,” says Equale, but otherwise Graham has said the Mueller investigation should not be interfered with. “Particularly in the context of his strong friendship with McCain, I have to believe that in his own mind he is performing a patriotic role.”

As this presidency unfolds, we will soon know whether Graham’s transformation will have a payoff. Washington is all abuzz about Trump’s receptivity to working out a citizenship path for the DACA kids, the dreamers, and maybe the 11 million undocumented immigrants living among us. Graham is one voice who’s got the President’s ear. If he’s also playing the long game and positioning himself to put country above party, should that need arise with a president whose untethered behavior raises alarm bells, we should know that soon enough too.