Hillary Clinton and Bernie Sanders. PBS Former Secretary of State Hillary Clinton and Sen. Bernie Sanders (I-Vermont) had a terse back-and-forth near the end of the Thursday-night Democratic presidential debate, during which Sanders accused Clinton of a "low blow."

Clinton took an opportunity to rip Sanders over his past criticism of President Barack Obama.

In an NBC interview that aired Thursday, Sanders took a slight dig at Obama, suggesting he failed to close the "presidential leadership gap" between Congress and the American public.

"This is not the first time he has criticized President Obama," Clinton said.

Clinton alluded to past comments from Sanders in which he called Obama "weak." She also pointed to a blurb Sanders wrote lauding the 2016 book "Buyer's Remorse: How Obama Let Progressives Down."

"I don't think he gets the credit he deserves for being a president who got us out of that ditch, put us on firm ground, and sent us into the future," Clinton said, noting that Obama entered office in the midst of a deep recession. The comment earned Clinton one of the biggest applause lines of the night from the debate's crowd in Milwaukee.

"The kind of criticism we've heard from Sen. Sanders about our president, I expect from Republicans," she continued. "I do not expect from someone running for the Democratic nomination to succeed President Obama."

Sanders smiled as he was being attacked.

"Madam secretary, that is a low blow," he said.

He went on to tout his experience working with Obama and the president's economic record. But, he argued, a senator in a democratic society had a "right" to disagree with a president, even of his own party, once in a while.

Sanders said he and Obama were friends.

"I think it is really unfair to suggest that I have not been supportive of the president," he said. "I have been a strong ally with him on every issue."

He then turned to Clinton: "Have you ever disagreed with the president? I suspect you may have."

Clinton returned to her criticism of Sanders, accusing him of supporting calls for a 2012 primary opponent during Obama's reelection.

"I think that goes further than saying, 'Hey, we have our disagreements,'" she said, later adding: "Those kinds of personal assessments and charges are ones that I find particularly troubling."

Sanders returned with a scathing end to the back and forth.

"One of us ran against Barack Obama," he said. "I was not that candidate."