CBS News White House correspondent Major Garrett on Friday said that it "should be noted" that the Obama administration attempted to "demonize" Fox News regularly.

"There was never an effort to shut me out of the briefing room," Garrett told Hill.TV's Krystal Ball and Saagar Enjeti on "Rising," referring to the Trump White House revoking press credentials from CNN reporter Jim Acosta James (Jim) AcostaToddlers' parents sue Trump over doctored 'racist baby' video Debate Commission snubs Latinos — again Red flags fly high, but Trump ignores them MORE.

Garrett worked as a White House correspondent at Fox News during the Obama administration.

"The [Obama] White House said it was at war with Fox News. I was its most visible editorial representative on the White House grounds as a senior White House correspondent," he continued.

"The White House would always pull me aside and say 'well, really, Major, we're not at war with you,' and I said 'stop talking to me like that because when you're at war with my network you by definition are questioning and assailing my journalistic credibility and the work I do here every day,' " he said. " 'So don't tell me it's not about me, it is about me.' "

"Now, they never tried to pull my pass, but they had this sort of arms-length relationship to Fox and tried to demonize it on a daily basis. So that's another part of American history and journalism in the White House press corps I think at least should be noted at this moment," he said.

Garrett's comments come amid increased tensions between CNN and the Trump administration.

A federal judge ruled Friday morning that the White House had to reinstate Acosta's press pass after it was revoked last week following a testy exchange between Acosta and the president.

Fox News, along with other news organizations, backed CNN in the dispute.

"It's not without precedent and it's not without some high-level people saying things [that were] very aggressive about a single news network," Garrett said.

— Julia Manchester