While Trump and Sanders basked in media attention for surprising success, Hillary Clinton was handicapped by high expectations — not to mention sexism. Photo: Paul Faith/AFP/Getty Images

Media coverage of the 2016 presidential nominating contests is getting a lot of retroactive attention thanks to the surprising Republican outcome and the surprising competitiveness of the Democratic race. Did media coverage affect the results? Certainly many partisans for Republican candidates not named Donald Trump think the mogul played the media like a violin and was awarded with massive coverage worth billions. And some supporters of Bernie Sanders think media treatment of Hillary Clinton as “inevitable” helped “rig” the game in her favor.

A new study from the Shorenstein Center at Harvard looking at the quantity and tone of media coverage in the months leading up to the 2016 caucuses and primaries casts new light on these contentions. It suggests that candidates who defied early expectations in order to position themselves as competitive candidates — principally Trump and Sanders — received heavy and disproportionately positive media. Meanwhile, Hillary Clinton, who had almost nowhere to go but down and who was drawing regular fire from both parties and from media sources themselves, had far and away the most negative coverage.

The study focused on eight major media outlets: CBS, Fox, the Los Angeles Times, NBC, the New York Times, USA Today, The Wall Street Journal, and the Washington Post.

It confirms the widely held argument that Trump received huge quantities of priceless “earned media” coverage as he rose from novelty candidacy to the top tier. What is more surprising is that his coverage was also positive. Here’s how the study authors explained that phenomenon, which is relevant to both parties’ nominating contests:

Why was Trump’s coverage so favorable? Why did the watchdog press say so many positive things about Trump’s candidacy? The reason inheres in journalists’ tendency to build their narratives around the candidates’ positions in the race. This horserace focus leads them into four storylines: a candidate is “leading,” “trailing,” “gaining ground,” or “losing ground.” Of the four storylines, the most predictably positive one is that of the “gaining ground” candidate, particularly when that candidate is emerging from the back of the pack. It’s a story of growing momentum, rising poll numbers, and ever larger crowds.

On the Democratic side, Bernie Sanders spent the first part of 2015 categorized as a likely loser who received very little media attention (indeed, the whole Democratic contest received relatively little attention until it became competitive). But once he gained traction, Bernie got some media buzz, and it wound up giving him the most positive media coverage of any candidate in either party, at least through 2015:

As his poll numbers ticked upward, [Sanders] was portrayed as a “gaining ground” candidate, a favorable storyline buttressed by reports of increasingly large crowds and enthusiastic followers. “The overflow crowds Sanders has been drawing in Iowa and New Hampshire,” said USA Today, “are signs that there is ‘a real hunger’ for a substantive discussion about Americans’ economic anxieties … .” The “real hunger” extended also to journalists, who are drawn to a candidate who begins to make headway against an odds-on favorite.

The odds-on favorite got virtually no breaks from either liberal or conservative media.

Whereas media coverage helped build up Trump, it helped tear down Clinton … Month after month … her coverage was more negative than positive. There was only one month in the whole of 2015 where the tone of her coverage was not in the red and, even then, it barely touched positive territory. During the first half of the year, excluding neutral references, it averaged three to one negative statements over positive statements. Her coverage in the second half of the year was more favorable, but still damning. The ratio for that period was more than three to two negative over positive.

This wasn’t a new phenomenon for Hillary Clinton; a similar study of media coverage during the run-up to the 2008 primaries had similar findings:

[O]f reporting that was positive or negative in tone, Obama’s coverage was 75 percent positive while Clinton’s was 60 percent negative.Regina Lawrence and Melody Rose’s book-length study of Clinton’s 2008 campaign documented the same negative tendency in her media coverage.

It’s unclear whether the negative tilt in coverage of Clinton is the product of her high initial standing in both contests as the supposedly inevitable nominee, media familiarity with negative stories about her and her husband, or just plain sexism.

If positive or negative coverage is mainly a function of horse-race dynamics, you’d figure the current media focus on both Trump and Clinton as wildly unpopular and beginning the general-election campaign in rough parity would even the playing field. But media awareness of the benefits they have showered upon Trump — a man who not-so-privately horrifies many reporters and media executives — does not seem to have abated the fascination with his every word and deed. And coverage of Clinton’s email scandal continues to treat it as the top legitimate concern about her candidacy. Whether it’s due to gender bias, habit, or her own wary attitude toward her media tormenters, media coverage of Clinton isn’t in any danger of becoming sunny. If she wins the presidency, it will be after a long voyage into the teeth of unforgiving winds.