Sen. Lindsey Graham, R-S.C., was duped into phone conversations with Russian pranksters posing as Turkish officials in August, his office confirmed to NBC News.

"We have been successful in stopping many efforts to prank Senator Graham and the office, but this one slipped through the cracks. They got him," Graham spokesman Kevin Bishop told NBC.

In recordings of the calls obtained by Politico, Graham bad-mouthed the same Kurdish allies he's accused President Donald Trump of betraying.

"Your YPG Kurdish problem is a big problem,” Graham told the pranksters, one of whom was claiming to be Turkey's defense minister, according to Politico. The reference was to Kurdish fighters who had been armed by the U.S. to combat ISIS.

"I told President Trump that Obama made a huge mistake in relying on the YPG Kurds,” Graham said, according to the report. "Everything I worried about has come true, and now we have to make sure Turkey is protected from this threat in Syria. I’m sympathetic to the YPG problem, and so is the president, quite frankly."

He also urged the "minister" to drop plans to use a Russian anti-aircraft system, the report said.

The pranksters — Russian shock jocks — got Graham back on the phone a few days later, and the South Carolina Republican told them he'd spoken to Trump about their call.

"We want a better relationship with Turkey. That’s exactly what he wants," Graham told them, according to the report.

"And this case involving the Turkish bank, he’s very sensitive to that," Graham continued. "The president wants to be helpful, within the limits of his power."

Graham appeared to be referring to a case involving a Turkish-Iranian gold trader named Reza Zarrab, who was represented by Trump's current lawyer Rudy Giuliani.

Graham, a top Trump ally, has spoken out forcefully against Trump's decision to withdraw U.S. troops from northern Syria, which has left Kurdish forces at the mercy of the Turkish military.

Asked about his comments on Thursday, Graham called the hoax "a Russian operation."

"If you knew anything about what I said since 2016, I said a win-win would be to protect the Kurds who fought with us to destroy ISIS who are in the eyes of Turkey a threat," he told reporters. He also compared Trump's decision to move troops out of the area to then-President Barack Obama's call to pull the military out of Iraq in 2011.

"My statement to you is this is worse than what Obama did. When Obama left Iraq all hell broke loose and if you think, Mr. President, ISIS is only a threat to Europe you really don't understand ISIS," Graham said, adding that U.S. allies should be "unnerved" by Trump's decision. Asked if this was Trump's Vietnam, Graham said, "No — this is worse."

The same Russian pranksters duped Rep. Adam Schiff in a 2017 call, when they pretended to be a former Ukrainian official offering "pictures of naked Trump." Schiff said he immediately reported the call to law enforcement.