(CORRECTION: This article originally referred to the Washington Posts’s Hunter Schwartz as Business Insider’s Hunter Walker.)

The stunning virtual tie between Bernie Sanders and Hillary Clinton in Iowa came after months of mainstream media pundits and leaders of the political establishment confidently predicting that Sanders would be no match for Clinton’s electoral machine there — or anywhere, for that matter.

“For now, Hillary Clinton has nothing to worry about as she prepares for the Iowa caucuses,” Bloomberg political reporter John McCormick wrote last May. “Despite a wave of influence-peddling allegations involving her family’s foundation, her prospects for winning the first-in-the-nation presidential contest remain undamaged.” McCormick cited a Quinnipiac poll showing Clinton capturing 60 percent of the vote in Iowa to Sanders’ 15.

Quinnipiac promoted this poll as definitive in the race. “One thing is obvious about Iowa Democratic Caucus participants: They are loyal as the day is long, at least when it comes to Hillary Clinton,” said Peter A. Brown, the assistant director of the Quinnipiac University Poll. “There is no candidate who appears to have the political and financial resources at this time to successfully take her on.”

Citing the same poll, Politico’s Annie Karni reported that “Clinton’s challengers are considered bit players, so far, in the drama of the 2016 election.” Laura Clawson, a Daily Kos editor, said that the poll is “evidence that the 2016 Democratic presidential primary is not the 2008 Democratic presidential primary,” with Clinton holding “an extremely healthy lead. Extremely healthy.”

A month later, FiveThirtyEight’s Harry Enten opined, “It’s difficult to imagine why someone who has described himself as a socialist, has never competed for minority voters and has no roots within the Democratic Party should worry Clinton much. … Clinton looks as strong as — or stronger than — any of these past front-runners. She is near 60 percent in Iowa.”

Enten also noted in June that one of the “foundational flaws” in the Sanders candidacy is that he “hasn’t been able to figure out how to earn more than 5 percent of the nonwhite vote.” In the latest New York Times/CBS News national poll, 27 percent of nonwhite voters are now behind Sanders.

“It’s not a given that his brusque style and pyrotechnical calls for a revolution will go down well in Iowa, for instance, where voters like to be wooed rather than harangued,” wrote CNN’s Stephen Collinson in late May, also quoting a political science professor who called Sanders a “hard sell.”

The Times’s Nate Cohn wrote in April that the Sanders candidacy won’t “change the fact that Hillary Rodham Clinton is poised to win the Democratic nomination without a serious contest.” Citing polls showing that a significant number of Democratic voters self-identify as moderates, Cohn said that “the left wing of the Democratic Party just isn’t big enough to support a challenge to the left of a mainstream liberal Democrat like Mrs. Clinton.”

Cohn didn’t consider it possible that some moderates would start flocking to Sanders — but by the beginning of January, the Times’ own national poll showed that more than a third had defected to the Vermont senator.

The day after Sanders announced his candidacy, Hunter Schwartz compared him to former congressman and failed presidential candidate Ron Paul in the Washington Post, saying that “both have polled with as low as 8 percent support — Paul in November 2011 and Sanders today. And while Paul averaged 23 percent of the vote in caucus states and 12 percent in primaries in 2012, that seems like a reasonable ceiling for Sanders.”

Some writers’ missteps were to treat early polling as definitive and static; others appeared to opine simply based on conventional wisdom. “There is Bernie Sanders, but I don’t think a lot of people seriously believe that he is really a viable challenger. He’s more of a protest candidate,” said Washington Post columnist Dana Milbank during an MSNBC appearance in August (a phrase also used by Sanders’ rival Martin O’Malley, who he easily trounced Monday night).

Buzzfeed’s D.C. editor John Stanton used a March appearance on MSNBC to say Sanders is “not a really like a serious candidate in terms of, you know, posing a serious challenge to her.” Presidential scholar Matthew Dickinson called Sanders’ run a “quixotic endeavor.”

Not coincidentally, that’s what mainstream media figures were hearing from their “insider” sources.  In February 2015, for instance, Politico surveyed a group of 70 Iowa Democratic party insiders, including members of Congress and party chairs. Only four answered that someone other than Clinton would win their state’s caucuses.

“I think the people of Iowa have sent a very profound message to the political establishment, to the economic establishment and, by the way, to the media establishment,” Sanders told supporters Monday night. “It is just too late for establishment politics.”

Related:

Top photo: Iowan John Jarecki dons a Bernie Sanders puppet suit to show support for the Vermont senator’s candidacy.