CNN's Brian Stelter says journalists "will have to reckon with" the media coverage of this year's presidential election.

"Tuesday night was the culmination of one of the biggest media failures in many years," Stelter said on "Reliable Sources" on Sunday, referring to the overwhelming number of news organizations that anticipated a win by Hillary Clinton.

Donald Trump's victory stunned many in journalism and politics. Polls and electoral college projections forecast a Clinton win, and left many viewers with the same impression.

"This did not occur in a vacuum. The Donald Trump campaign also thought it was likely to lose. Wall Street thought Trump would lose, too," Stelter said.

"But chalking all of this up to a surprise victory is not enough. This was a collective failure; a failure of imagination. In some ways, a mass delusion. And the media contributed to it. So now it's time for some serious soul searching."

Related: Trump's Sunday morning tweetstorm at the Times

Stelter cited some of the extraordinary journalism that was produced during the election season. "I don't subscribe to the argument that TV networks gave Trump too much attention and that's the main reason why he's president, nor do I subscribe to the argument that reporters ignored Trump's America. There were outstanding reports and eye-opening cable news debates this year," he said.

"But I know that some of you watching right now are having a very hard time trusting this channel and every other news source. So, we on the other side of the screen, over here, have to reckon with that, not just for a week or two but for the long term."

He said the bottom line is that "there are lessons to be learned, if we are willing to learn them."

Former CBS anchor Dan Rather said on "Reliable Sources" that "we didn't do our job as well as we could have and should have."

Going forward, newsrooms need to be "fiercely independent" while covering a Trump administration, Rather said.

Related: Trump says Twitter helped me in

"Our job now is to stand up, look him in the eye, ask the tough questions, don't be intimidated. Trump prides himself on being an intimidator," he said, calling this a "gut check time for the press."

Rather said the owners of big media companies also need to "have some spine."