Former President Barack Obama stood up for a free press in his first political speech of the 2018 campaign season, but he engaged in a bit of revisionist history when it came to his administration’s dealings with Fox News.

“It shouldn’t be Democratic or Republican to say that we don’t threaten the freedom of the press because they say things or publish stories we don’t like,” Obama said in a Sept. 7 speech in Illinois. “I complained plenty about Fox News, but you never heard me threaten to shut them down or call them enemies of the people.”

The Democratic president did more than complain. His administration at times took action against the cable network. The Obama Justice Department surveilled one of Fox News’ reporters, and a White House spokesman acknowledged excluding Fox News from interviews.

And while he may never have called Fox News “enemies of the people” — a phrase President Donald Trump has used repeatedly for the media at large — Obama did say that its “point of view” was “ultimately destructive” to the U.S.

Here are some of the times when the Obama White House took aim at Fox News.

Obama Snubs Chris Wallace

On Sept. 20, 2009, Obama appeared on five Sunday talks show – NBC, CBS, CNN, ABC and Univision to talk about health care. But he did not appear on “Fox News Sunday.”

The snub came less than two weeks after Fox Broadcasting Network did not carry the president’s joint address to Congress on health care. The Sept. 9, 2009, speech was carried by the Fox News Channel, but not the Fox network — which aired an episode of “So You Think You Can Dance,” from 8 p.m. to 9 p.m. that night.

Robert Gibbs, the Obama White House press secretary at the time, complained about it during an appearance on “Fox and Friends” prior to the speech.

When it came time to schedule Obama for the post-speech Sunday talk show circuit, Fox News was the only major Sunday show that did not have Obama as a guest.

Then-White House spokesman Josh Earnest deflected questions about why Obama would not appear on “Fox News Sunday” by saying: “We figured Fox would rather show ‘So You Think You Can Dance’ than broadcast an honest discussion about health insurance reform.”

“They are the biggest bunch of crybabies I have dealt with in my 30 years in Washington,” Chris Wallace, anchor of “Fox News Sunday,” said about White House snub.

Obama did not appear on “Fox News Sunday” until his last year in office.

White House Labels Fox News Illegitimate

Anita Dunn, who was then the White House director of communications, told the New York Times in an interview on Oct. 11, 2009, that Fox News was not a legitimate news organization.

“We’re going to treat them the way we would treat an opponent,” Dunn told the Times. “As they are undertaking a war against Barack Obama and the White House, we don’t need to pretend that this is the way that legitimate news organizations behave.”

She also said, when asked about snubbing “Fox News Sunday” with Chris Wallace, “we’re not going to legitimize them as a news organization.”

White House Willing to ‘Exclude Fox News’ from Interviews

In October 2009, the Obama administration and Fox News got into a public dispute over whether the Treasury Department intentionally attempted to exclude Fox News from on-camera TV interviews with the administration’s so-called “pay czar,” Kenneth Feinberg.

A Treasury Department spokesman described the dispute as a miscommunication – “much ado about absolutely nothing” – that ended with Fox News interviewing Feinberg on camera for the Oct. 22, 2009, nightly news. Fox News reported that the administration “failed in its attempt to exclude Fox News” only after “the Washington bureau chiefs of the five TV networks consulted and decided that none of their reporters would interview Feinberg unless Fox News was included.”

Whatever the intent, White House spokesman Josh Earnest acknowledged that the Obama White House had a history of freezing out Fox News.

A day after the Feinberg flap, Talking Points Memo quoted Earnest as saying, “This White House has demonstrated our willingness to exclude Fox News from newsmaking interviews, but yesterday we did not.”

Obama Calls Fox News ‘Destructive’

Obama may never have called Fox News “enemies of the people,” but he did say that its “point of view” was “ultimately destructive” to the U.S.

In a Rolling Stone magazine interview in 2010, Obama compared Fox News to William Randolph Hearst and his style of so-called “yellow journalism.” He called its point of view “ultimately destructive for the long-term growth” of the U.S.

Rolling Stone: What do you think of Fox News? Do you think it’s a good institution for America and for democracy? Obama: [Laughs] Look, as president, I swore to uphold the Constitution, and part of that Constitution is a free press. We’ve got a tradition in this country of a press that oftentimes is opinionated. The golden age of an objective press was a pretty narrow span of time in our history. Before that, you had folks like Hearst who used their newspapers very intentionally to promote their viewpoints. I think Fox is part of that tradition — it is part of the tradition that has a very clear, undeniable point of view. It’s a point of view that I disagree with. It’s a point of view that I think is ultimately destructive for the long-term growth of a country that has a vibrant middle class and is competitive in the world. But as an economic enterprise, it’s been wildly successful. And I suspect that if you ask Mr. Murdoch what his number-one concern is, it’s that Fox is very successful.

Obama Justice Department Labels Fox News Reporter ‘Co-conspirator’

In 2010, when investigating possible leaks of classified information about North Korea, the Obama Justice Department collected Fox News reporter James Rosen’s telephone and email records and tracked his movements at the State Department, according to the Washington Post.

The Post, which broke the story in 2013, wrote that it had obtained a court affidavit that showed the Justice Department used security badge access records to track Rosen’s visits to the State Department, traced his calls to a department security adviser suspected of sharing classified information, and obtained a search warrant to seize two days’ worth of emails with the department official.

In the affidavit for a search warrant, FBI agent Reginald Reyes said there was evidence that Rosen — the chief Washington correspondent for Fox News — broke the law. Reyes described Rosen as “either as an aider, abettor and/or co-conspirator.”

“Search warrants like these have a severe chilling effect on the free flow of important information to the public,” First Amendment lawyer Charles Tobin told the Washington Post.

In a statement, Michael Clemente, Fox News’ executive vice president of news, said the news organization was “outraged to learn today that James Rosen was named a criminal co-conspirator for simply doing his job as a reporter.”

On its website, Fox News ran Clemente’s statement along with supportive quotes from journalists and editorial board writers from major news organizations, including the New York Times.

“With the decision to label a Fox News television reporter a possible ‘co-conspirator’ in a criminal investigation of a news leak, the Obama administration has moved beyond protecting government secrets to threatening fundamental freedoms of the press to gather news,” the New York Times editorial board wrote.

The Post report on the Justice Department’s investigation involving Rosen came not long after the Justice Department seized two months of telephone records of reporters and editors at the Associated Press. Gary Pruitt, the AP’s chief executive officer, called the action “unconstitutional.”

The actions taken in the cases involving Fox News and the AP went to a larger issue of the Obama administration’s aggressive prosecutions of leaks.

“Under the Obama administration, charges were brought against at least eight government employees or contractors accused of leaking information to the media, and several journalists were snared in the process through subpoenas to testify or surveillance of their records,” the Committee to Protect Journalists wrote last year. “After public outcry, the Department of Justice released revised standards for subpoenaing reporters.”