Until recently, Sen. Lindsey Graham had been one the most outspoken critics of President Donald Trump's decision to pull U.S. troops out of Syria ahead of Turkish military action across the border into Kurdish territory.

But, after speaking with Trump on Saturday, he said he had changed his mind.

When he first learned of the move, Graham said it was "short-sighted and irresponsible" and warned that abandoning the Kurds, who had allied with the U.S. against the Islamic State, would leave "a stain on America's honor."

On Wednesday, he said that Trump "appears to be hell-bent on making the same mistakes in Syria as President Obama made in Iraq" and on Thursday said Turkey's "invasion of northeastern Syria has created the conditions for the reemergence of ISIS and the destruction of our allies."

But on Sunday, Graham told Fox News' Mario Bartiromo that he planned to "withhold judgment" on Syria "until it's all in."

He added that he blames Turkish President Recep Erdogan "for the invasion, not Trump" and that he is "increasingly optimistic that we can have some historic solutions in Syria that have eluded us for years, if we play our cards right."

Graham said the situation could lead to "historic security" for the Kurds and the Turks while also keeping the oil fields in northeast Syria out of Iranian hands. He said that "we're on the verge" of a deal that could give the oil revenue to the Kurds.

Graham's comments came a day before Trump said a "small" number of U.S. troops will remain in Syria, in an apparent reversal.

On Monday, Defense Secretary Mark Esper said some troops would stay to guard the oil fields and prevent a resurgent Islamic State from taking them, The Associated Press reported.

Citing an anonymous White House official, AP reported that leaving U.S. forces to protect the oil fields had been Graham's idea and that Trump had agreed.

Lindsey Graham to President Trump:'I will hold you accountable' on Turkey's actions in Syria

'A stain on America's honor':Lindsey Graham says Trump's Syria pullout abandons Kurds, helps ISIS

"The big thing for me is the oil fields," Graham said Sunday. "President Trump is thinking outside the box. I was so impressed with his thinking about the oil."

Graham hoped the arrangement "could generate revenue to pay for our commitment in Syria."

"A plan to keep ISIS down and out forever, and a chance to keep the oil fields in the hands of our allies, not our enemies, would be a hell of an outcome, and I think that's now possible," he said.

Bartiromo pointed out that his comments to her were "completely different" from the sharp criticism Graham has had for Trump on Syria.

"Yes," Graham said.

"So, you have changed your mind based on what you have heard from the president last night?" she asked.

"Yes," he replied.

"I still believe that, if we abandon the Kurds, nobody helps you in the future," he added.

'A reckless gamble':Four reasons critics decry Trump's 'impulsive' Syria withdrawal

In addition to appearing assuaged about the fate of the Kurds, Graham – who had predicted Turkey's invasion could free Islamic State fighters the Kurds had detained – was now confident that the ISIS fighters would not be allowed to escape.

"A small contingent of Americans providing airpower and capability will keep ISIS at bay and keep the jails locked up and the Kurds," he said. "The ISIS fighters won't break out."

Graham's criticism of the administration began to soften with the announcement Thursday of a cease-fire between the Turkish forces and the Kurds, though on Friday he still said he feared Turkey would engage in "ethnic cleansing."

After speaking with Vice President Mike Pence on Friday night, Graham said the administration was "trying to create a win-win in Syria."

"We have a chance to do historic and positive things for our NATO ally, our Kurdish allies, and the people of the region. There is an opening – I hope people will take it," he tweeted.

'The Kurds are being slaughtered':House votes to condemn President Trump’s troop pullout from Syria

Trump downplays ties to Kurds:'They didn't help us in the Second World War'

The situation in Syria does not represent the first time Graham has done a dramatic about-face when it comes to Trump.

During the 2016 Republican primary campaign, Graham said Trump was a "race-baiting, xenophobic, religious bigot" but he has since become one of his most ardent defenders on Capitol Hill.

When asked about that shift by Axios in an interview that aired Sunday, Graham explained he "didn't know him" then and didn't like how Trump ran his campaign. But he decided to help Trump.

"I've gotten to know him, and I find him to be a handful. I find him to be an equal-opportunity-abuser of people," Graham said. "But, at the end of the day, he can be very charming and be very gracious. And I am judging him by his conduct. If I spent all day analyzing every tweet he issued, I'd go nuts."

Can our friends trust the US as an ally?:Most Americans say Trump's Syria move has hurt