Amy Fiscus, the New York Times’ national security editor, criticized former President Barack Obama’s prosecution of anonymous government sources Friday.

In his speech at the University of Illinois Friday, Obama said that he, unlike Trump, never threatened to shut down media outlets.

"I complained plenty about Fox News, but you never heard me threaten to shut them down, or call them enemies of the people," he said.

Fiscus found this argument wanting.

"Your DOJ also prosecuted more leak investigations than all other presidents’ combined. Come on," Fiscus wrote.

Fiscus was referring to the then-unprecedented efforts by the Obama White House to out leakers and prosecute those helping them. Most notably, former Fox News reporter James Rosen was accused of violating anti-espionage law for what one reporter at the time termed "traditional news reporting."

At the time, Major Garrett, CBS’s chief White House correspondent, asked Obama press secretary Jay Carney: "The subpoena says James Rosen is a potential criminal because he's a reporter. Is the White House comfortable with that standard, never before seen in a leak investigation?"

Carney replied: "We need to make sure that leaks are not tolerated because leaks—they can endanger the lives of our men and women, and endanger our national security—need to be taken very seriously."

Trump is currently dealing with a high-profile leaker of his own in the author of an anonymous op-ed published by the New York Times.

The Obama Treasury Department tried to exclude Fox News from pool coverage made available to all other outlets, according to CBS News, only permitting Fox’s presence after other media outlets protested.

The Obama DOJ also seized two months of phone records from the Associated Press. The AP president and CEO then wrote to Obama’s Attorney General Eric Holder to "object in the strongest possible terms to a massive and unprecedented intrusion by the Department of Justice." Jennifer Rubin of the Washington Post was among the many to criticize the Obama administration’s treatment of journalists, accusing Obama of "the most invasive breach of the First Amendment against any news organization in the history of the republic."

Fiscus wrote the comment in response to Brian Stelter, host of CNN’s "Reliable Sources," who had quoted Obama and voiced support for the president’s statement. Stelter said: "Obama [is] telling the truth about his media criticism versus Trump's criticism."

Stelter has in the past accused the Obama administration of attacking the news media. Writing in 2009, Stelter wrote: "Attacking the news media is a time-honored White House tactic but to an unusual degree, the Obama administration has narrowed its sights to one specific organization, the Fox News Channel, calling it, in essence, part of the political opposition."

Stelter denied taking sides, despite having endorsed Obama’s statement as true.