Fox News took Bill O’Reilly off the air after a heavy campaign to fire him led by CNN’s media unit and The New York Times. If all the charges of sexual harassment are true, his case is indefensible. That said, it’s time for his media critics to stand down. They are guilty of rank hypocrisy.

These same media outlets despised the idea that Donald Trump would drag Bill Clinton’s sexual harassment lawsuits into the presidential campaign. On Jan. 8, 2016, the Times editorial staff sneered: “It is also a tired subject that few Americans want to hear more about. If Mr. Trump has not read enough, he can curl up with a copy of the Starr report.”

Bizarrely, the editorial noted that Hillary Clinton had told a New Hampshire town hall questioner a month earlier that Juanita Broaddrick’s tale of rape was not to be believed. Yet it was Trump who was denounced as sexist and beyond the pale. The Times said: “His aim is to dredge up an ancient scandal and tar Mrs. Clinton with it in a clearly sexist fashion. There should be no place for that kind of politics in this country.” That is, unless it’s the top draw at Fox News, in which case it’s suddenly America’s greatest concern.

On April 2, 2017, the Times published a 3,148-word front-page article lamenting “O’Reilly Thrives as Settlements Add Up.” Reporters Emily Steel and Michael Schmidt declared that their investigation found five women who received payouts from either O’Reilly or Fox “in exchange for agreeing to not pursue litigation or speak about their accusations against him. The agreements totaled about $13 million.”

As they noted, the lion’s share of that total came in a $9 million settlement from 2004. That was 13 years ago, but it didn’t qualify as a “tired subject” or some “ancient scandal.”

CNN relentlessly pushed for O’Reilly’s dismissal, calling up advertisers and pressuring them to take commercials off their competition. Bashing O’Reilly dominated their Sunday show “Reliable Sources” for weeks and their “news” programming after their victory.

But two days after the Monica Lewinsky scandal broke in 1998, CNN aired a town hall meeting titled “Investigating the President: Media Madness?” Host Jeff Greenfield insisted that millions of Americans were “asking the press one question fraught with significance: What the hell are you people doing trying to find out what kind of sex the President of the United States might or might not be having?”

Back then, it was “media madness” to investigate whether then-President Bill Clinton might be assaulting women in the workplace — the Oval Office. There was zero concern about a “culture of abuse” inside the White House. For good measure, CNN moved on to specials attacking special prosecutor Ken Starr for prudishly investigating where CNN and the rest of the press never wanted to go.

It’s not only CNN and the Times that are displaying a different moral standard. Does no one find it just a wee bit ironic that disgraced Brian Williams is still doing a weeknight show on MSNBC, where he can lecture that O’Reilly was dispatched by “the power of the female consumer”?

Women deserve a workplace where men don’t harass them for sex. But that’s what these sanctimonious liberal journalists care about. It just doesn’t matter how brutal the alleged rape of Juanita Broaddrick was. What matters is that Bill O’Reilly had to go.