Since Donald Trump’s election in 2016, the mainstream media has shed its once-noble mission — the pursuit of the truth — and instead adopted a new purpose: to take down the president. In an excerpt from her new book, “Resistance at All Costs: How Trump Haters are Breaking America,” out Tuesday, KIMBERLEY STRASSEL examines how far the press will go in its relentless crusade . . .

Last week The Washington Post revealed the alarming news that House Democrats were considering having their anonymous “whistleblower” testify from a remote location, and in disguise. Just as shocking as the details of this plan was the justification the Post ladled on this Democratic effort to hide impeachment information from the public.

It explained, high up in the story, that the cloak-and-dagger approach was merely Democrats expressing “distrust of their GOP colleagues, whom they see as fully invested in defending a president who has attacked the whistleblower’s credibility and demanded absolute loyalty from Republicans.”

This, from a newspaper with a tagline of “Democracy Dies in Darkness.”

Maybe the better journalistic epitaph is: Democracy dies in bias. How did journalism get here?

I’ve never engaged much in media criticism, because it’s almost too obvious. Yes, the mainstream media is liberal and biased. But at least in the past, that bias was largely a function of insularity. Most reporters weren’t even fully aware they were prejudiced politically; everyone they worked and socialized with held the same left-of-center views.

That’s changed in the age of Trump. The press has embraced its bias, joined the Resistance and declared its allegiance to one side of a partisan war. It now openly declares those who offer any fair defense of this administration as Trump “enablers.” It writes off those who question the FBI or Department of Justice actions in 2016 as “conspiracy” theorists. It acts as willing scribes for Democrats and former Obama officials; peddles evidence-free accusations; sources stories from people with clear political axes to grind; and closes its eyes to clear evidence of government abuse.

This media war is extraordinary, overt and increasingly damaging to the country.

The latest installment of this Democratic-media tie-up is the Ukraine story. Just a few weeks ago, House Intelligence Committee Chairman Adam Schiff explained that the intelligence community inspector general wanted to transmit an anonymous “whistleblower” complaint to him but had been stopped by the Trump administration. Schiff has for 10 months been obsessing over how to impeach Trump, so his claim merited great skepticism.

Instead, the media ran with it. Even as it acknowledged that it did not know the subject of the complaint, or the background of the accuser, it began running stories postulating that the Trump administration had engaged in a cover-up. It later accepted whole-cloth the whistleblower’s hearsay accusation that Trump had demanded a Ukrainian investigation into former Vice President Joe Biden as a condition of military aid — before even seeing a transcript of the Trump call. The New York Times was so eager to push the impeachment narrative forward (and give it credibility) that it divulged the sensitive detail that the whistleblower was a CIA officer detailed to the White House.

Sadly, the press behavior of the past few weeks is nothing new. The election of Donald Trump has led to the greatest disintegration of press standards in modern history. For those wondering if they are getting the “real story” in the Ukraine impeachment drama, it’s worth taking a walk back through the past few years of what we now know was the Russia-collusion hoax.

One particularly bad decision helped drive all the rest of that false narrative: The press became willing advocates for government actors (at least the ones they liked). This is the reverse of the role the press is supposed to play. The media exists to be a government watchdog.

Sure, when it comes to the Trump administration, the press rides herd on every issue. But when it has come to former Obama officials (Jim Comey, Andrew McCabe, John Brennan), the media has swallowed everything it is told. It’s hard to explain just how big a dereliction of duty this is. The FBI’s Trump-Russia investigation fell clearly into a government-abuse-of-power story, of the kind the press exists to expose. It came laden with red flags — opposition research from the rival campaign, backdoor channels to the IRS, surveillance of American citizens. And yet anything the former people of power told the press to write, the press wrote.

Willingness to cast aside facts in favor of theory is what has fed years of hysterical collusion conspiracy theories.

The best example is that infamous New York Times story about the “origin” of the FBI probe. In late 2017, when former House Intelligence Chairman Devin Nunes finally came close to winning his battle with the DOJ to see documents about the infamous Steele dossier, FBI protectors panicked. They knew how terrible it would look that they had used opposition research from a rival campaign to get surveillance warrants on at least one Trump campaign official. So someone called The New York Times for help in getting ahead of the story. On Dec. 30, 2017, it published: “How the Russia Inquiry Began: A Campaign Aide, Drinks and Talk of Political Dirt.”

The story was, of course, all about how George Papadopoulos had inspired the FBI’s probe, and it flat-out narrated what would become the FBI line about its origins. It also flatly dismissed the dossier. The Papadopoulos take “answers one of the lingering mysteries of the past year: What so alarmed American officials to provoke the FBI to open a counterintelligence investigation into the Trump campaign months before the presidential election? It was not, as Trump and other politicians have alleged, a dossier compiled by a former British spy hired by a rival campaign,” opined the Times. The story cited nobody in its story other than anonymous “American and foreign officials.”

In May 2018, the paper ran another “blockbuster” story about the FBI’s Trump investigation, which was code-named Crossfire Hurricane. The Times reported that “Only in mid-September, congressional investigators say, did [the dossier] reach the Crossfire Hurricane team.” This is false. Justice Department official Bruce Ohr has testified under oath that he briefed a lot of people about the dossier — and its political provenance — not long after it was handed to him in late July. As of the writing of this book, the Times has never updated or corrected that piece.

The willingness to be spoon-fed is what drove so many big press bloopers. Were there a Collusion Press-Error Hall of Fame, CNN would be the first inductee. There was CNN’s decision in 2017 to run a story, based on one unnamed source, claiming a presidential adviser, Anthony Scaramucci, was under investigation for his ties to a Russian investment fund. CNN had to retract the story, and three of its journalists resigned.

In December 2017, CNN announced a scoop for the ages. It claimed it had evidence that Donald Trump Jr. had been offered by advance access to hacked Democratic emails. MSNBC and CBS also claimed to have “confirmed” this evidence that the Trump campaign and WikiLeaks had been colluding. It later came out that the outlets had gotten the date on their evidence wrong. Donald Trump Jr. had been sent an email directing him to look at the WikiLeaks dump — after WikiLeaks had made it public.

Also don’t forget BuzzFeed’s epic “news” in January 2019 that President Trump personally directed his longtime attorney Michael Cohen to lie to Congress about the Trump Tower project in Moscow. Politicians seized on the news, and Schiff promised to do what was “necessary” to find out if the president had committed “perjury.” Democratic Rep. Joaquin Castro said that if the allegations were true, Trump “must resign.” The problem? They weren’t. This one was such an invention that special counsel Bob Mueller’s team made a rare statement, denying the BuzzFeed report.

There are plenty more. The Washington Post claimed Russians had accessed the US electrical grid through a Vermont utility. Not true. Slate claimed a Trump server had been communicating with Russia. Not true. The Guardian claimed that Paul Manafort had visited Julian Assange in his hideout at the Ecuadorian Embassy in London — three times. If so, Mueller missed it. The press gets furious when Trump talks about “fake news.” But what else would you call this?

Another low of the past few years — which we are seeing again now — has been the media’s willingness to run fact-free accusations. Case in point: claims from the Steele dossier. The specific charges in that document have never been proven. Opposition-research firm Fusion GPS was incredibly clever in its decision to feed that document to the FBI to give it more credibility. But the fact that the FBI had it or, that Schiff was irresponsible to quote from it during a hearing, didn’t release the press from a basic obligation: to either verify the truth or treat the document for what it was — slander. Instead, the media repeated the dossier’s claims ad nauseum, rarely bothering to note the partisan motivations behind its creation.

This willingness to cast aside facts in favor of theory is what has fed years of hysterical collusion conspiracy theories. By embracing hypothetics (rather than tracking down facts), the press indulged in endless “connect the dots” exercises.

In April 2018, two reporters from McClatchy cited “sources” who said, “Mueller has evidence [Michael] Cohen was in Prague in 2016, confirming part of the dossier.” The story claimed Cohen had secretly snuck into the Czech Republic, through Germany, presumably for a clandestine meeting with Kremlin officials. It again quoted only “sources familiar with the matter.” Yet Cohen had vehemently insisted that he’d never been there. And the Mueller report would later flatly say he had not. McClatchy, as of the writing of this book, still hasn’t retracted the story. Why? It claims that what it was reporting was that Mueller had “received evidence,” and it noted that Mueller never said he didn’t receive evidence. See?

Liberal opinion writers were even worse. One of the standout headlines from 2018 came from Jonathan Chait, writing in New York Magazine. It read: “Prump-Tutin: Will Trump Be Meeting with His Counterpart — Or His Handler?” Chait asked: “What if Trump has been a Russian asset from 1987?” Then followed thousands of words that purported to tie together Trump, obscure Russians, Stormy Daniels, Assange and so much more. The story, suffice it to say, did not age well.

All reporters sometimes bend a rule, or go out on a limb or get something wrong. But the important thing is that they usually do this in aid of getting truth to the public. What has defined the media breakdown that started in 2016 was the press’ abandonment of standards in aid of peddling a narrative — rather than reality. This abandonment has had terrible consequences for the industry and for the country. A Monmouth University poll in early 2018 found that a whopping 77 percent of Americans believe traditional TV and newspaper outlets report “fake news.” And 42 percent of respondents said they believed outlets did this specifically to promote a political agenda. These kinds of numbers are alarming for civil society. The more Americans are turned off from traditional news, the more they turn to dubious sources and read and listen only to things with which they agree. For those worried about our increasingly polarized society, the media is feeding that divide.

Excerpted from “Resistance at All Costs: How Trump Haters Are Breaking America” by Kimberley Strassel, Copyright © 2019. Available from Twelve, an imprint of Hachette Book Group, Inc.