Donald Trump seemed to run harder against the media than against Hillary Clinton some days. One was “dishonest,” he’d say, the other “crooked.” And neither, he argued, was on the side of Americans.

On Tuesday, he beat them both.

“The vaunted power of the media is not what it once had been,” Fox News anchor Brit Hume declared overnight, as results signaled a Trump victory in the 2016 election.

Pundits who consistently wrote off Trump after his latest outrage and prognosticators predicting a Clinton victory through Tuesday afternoon will have plenty to answer for in the coming media autopsies.

History will not be kind to the news media for its uncritical obsession early on. Trump was treated for too long as a reality star and TV pitchman rather than contender for the most powerful position in the world. Journalists with access and opportunities to challenge Trump often failed to do their jobs, and he exploited the priorities of news executives motivated by ratings.

Television networks, most notably, propped up Trump’s candidacy during the Republican primary with a hugely disproportionate amount of attention, unprecedented accommodations, and little scrutiny as he uttered falsehoods in interviews and in evening rallies carried live as breaking news events. Hosts failed to question Trump’s shaky business record, and network executives treated bigotry as just another political position to hash out among commentators.

But major news organizations such as The New York Times and The Washington Post investigated Trump’s murky business dealings and bogus charity. The Times chronicled Trump’s demagoguery and fear-mongering before most outlets and later revealed how the businessman avoided paying taxes.

While legacy print and digital outlets such as BuzzFeed and The Daily Beast appeared more aggressive than their television counterparts, there was a shift on air as Trump grew closer to winning the Republican nomination.

Editors of nonpartisan news outlets, often reluctant to call a lie a lie, began doing so on the front page. Fact-checkers worked overtime covering Trump’s brazen and unprecedented dishonesty. And journalists contended throughout the election with the rampant spread of misinformation on social media.

Throughout the election, Trump showed unmatched disdain for the press, including blacklisting nearly a dozen news organizations. He vilified journalists at events, as ravenous supporters responded with jeers and slurs. His attacks and antics don’t bode well as he heads into the White House.

Trump’s bigotry and misogyny wasn’t hidden from the American people.

His offensive comments, such as calling Mexican immigrants “rapists” and drug dealers, were covered from the start. The news media highlighted Trump’s appeals to racial grievances, which has empowered white nationalists, and the Republican nominee using anti-Semitic tropes to suggest elites in banking, media and government were conspiring against the American people.

News organizations covered Trump’s misogyny in deeply reported stories and covered the sexual harassment or misconduct allegations leveled by a dozen women. Networks played the “Access Hollywood” video on a loop, and yet millions of Americans appear unbothered by Trump’s behavior.

Nearly every major U.S. newspaper editorial page endorsed Clinton, including some conservative editorial boards that picked a Democratic nominee for the first time in more than a century. Editors laid out in great detail why Trump was uniquely unfit for the presidency and how he represents a grave danger to not only the country but the entire world.

But in the end, more Americans in enough states decided that in the face of overwhelming evidence, and reams of critical coverage, Donald Trump should be entrusted with the presidency.