A former Obama administration official turned CNN analyst said her administration’s policy of separating children from their families at the border was done “for their protection,” while decrying the same policy under President Trump as “inhumane treatment.”

Samantha Vinograd made the eyebrow raising claims on Tuesday during an appearance on “The Situation Room” with Wolf Blitzer. At no point CNN disclosed to its viewers in the chyron of her work at the Obama administration, where she held a number of roles, including being on the National Security Council.

“When President Obama separated children from their families, it was for their protection. It was if there was a risk of trafficking or other kind of harm that might have been incurred,” Vinograd said.

TRUMP SAYS NO PLAN TO REVIVE FAMILY SEPARATIONS, BLAMES OBAMA FOR UPROAR

“But even if he did do that, why is Donald Trump saying that two wrongs make a right? Again, Obama wasn’t wrong, but so he’s saying that because something happened under President Obama, he’s repeating it and upping the ante.

“That’s an incredibly poor excuse. He’s systemized that inhumane treatment that, again, Obama was doing to protect the children.”

"[Trump] systemized that inhumane treatment that, again, Obama was doing to protect the children.” — Samantha Vinograd

Vinograd’s remarks came after Trump’s said that the policy of separating children at the U.S.-Mexico border is unlikely to come back and blamed Obama for the uproar over the policy.

FROM 'NO CRISIS' TO 'BREAKING POINT': MAINSTREAM MEDIA OUTLETS CHANGE THEIR TUNE ON BORDER CRISIS AMID ILLEGAL IMMIGRATION SURGE

“Obama separated the children, just so you understand. President Obama separated the children,” Trump said. “The cages that were shown, very inappropriate, they were built by President Obama and the Obama administration –not by Trump.”

“The press knows it, you know it, we all know it,” he said. “I’m the one that stopped it.”

Initial images of cages with children inside that spread on social media last year were from the Obama administration. The photos, taken in 2014 by The Associated Press, were wrongly described as illustrating imprisonment under the Trump administration.

CLICK HERE TO GET THE FOX NEWS APP

But while some family separations may have happened under Obama, it was not nearly as widespread as it was during the Trump administration, amid a “zero tolerance” policy that led to the separations.

Fox News' Brooke Singman contributed to this report.