Donald Trump’s relationship with the news media during his successful run for the presidency was, put politely, complex. A better word might be codependent. Trump lashed out regularly at those whose coverage of his campaign he found unfavorable — tweeting insults, banning and unbanning news organizations, promising to strengthen libel and defamation laws. But free media coverage, particularly from TV news outlets, was also the fuel that powered the Trump machine.

What television news outlets received in return were outsize ratings. For the four weeks of Oct. 10-Nov. 6, CNN, Fox News and MSNBC averaged 84% more primetime viewers than they did over the same period a year ago. The increased numbers — and accompanying ad dollars — rolled in as the networks handed large swathes of airtime over to live feeds of Trump campaign events. Those same networks were caught by surprise Tuesday night by Trump’s victory. Now they must decide whether the trade-off was worth it.

“I think they have to examine the amount of unfiltered airtime they gave to the President-elect,” said Katz Television Group’s Bill Carroll. “If you were going to look at any of the cable networks for the last year, often the key phrase would be, ‘And now we go to a rally for Donald Trump.’”

Speaking at Harvard in October, CNN president Jeff Zucker defended his network’s coverage of Trump.

“If we made a mistake last year, it’s that we probably did put on too many of his campaign rallies in those early months unedited and just let them run,” Zucker said. But, he added, “I do not believe and I totally reject that that’s how he got the Republican nomination.”

The Trump campaign, however, was well aware of how the candidate’s TV ubiquity aided his cause. Former Trump advisor Barry Bennett bragged to Fox News in April that the candidate had “literally gotten hundreds of millions of dollars worth of free media” from TV news. Analysts have predicted a downturn in overall political ad spending from projections made last year based on a Trump media strategy that relied more heavily on free screen time than paid.

The foundation of that strategy was Trump’s celebrity, particularly his experience as a reality television star on “The Apprentice” (which was greenlit by Zucker when he led NBC). Trump’s flair for improvisation and ability to entertain set him apart the crowded field of Republican primary aspirants early in the campaign.

“One reason that he got more coverage [than other GOP candidates] was that some of the things he said were just amazing,” said the Poynter Institute’s Al Tompkins. Trump’s off-the-cuff, sometimes entertaining, often offensive remarks provided needed grist for the TV news mill. “Every journalist that travels with candidates knows that you hear exactly the same thing day after day after day,” Tompkins said. “Trump just didn’t do that. Trump was constantly supplying new narrative, and that makes for fresh coverage.”

The other reason for Trump’s near-constant presence on TV news was his near-constant availability. Whereas other primary candidates were comparatively cautious about giving interviews, Trump early in the campaign spoke frequently with multiple outlets. “In his defense and in our defense, when we asked him for an interview, he said yes, and I cannot say that about the other Republicans who were running for President,” Zucker said in October.

But as the campaign wore on and Trump emerged as the GOP standard bearer, he began to limit his interviews to friendly journalists such as Fox News’ Sean Hannity and Bill O’Reilly. His relationship with media at large became more contentious. At his rallies, supporters antagonized journalists with threatening remarks and slogans.

Trump also began to take aim at press freedom. At a rally in February, he told the crowd, “I’m going to open up our libel laws so when they write purposely negative and horrible and false articles, we can sue them and win lots of money.”

With Trump now bound for the Oval Office, his relationship with the press could hinge on whether he is serious about that goal. If he is, he would set himself again at odds with the television news organizations that have been a traditional communication pipeline between the White House and the electorate and midwifed his political career.

But even open warfare with the President may not be enough to compel networks to reconsider their early coverage of Trump.

“I’m not sure how much choice the news media had,” said Nicco Mele of Harvard’s Kennedy School of Government. “He was a legitimate news story.” But the quality of that coverage was questionable. A September study by Mele’s Kennedy School colleague Tom Patterson found that between the Iowa and Indiana primaries, coverage of Trump skewed overwhelmingly positive — 57% positive, well more than top rivals Ted Cruz (46%), John Kasich (38%), and Marco Rubio (37%). “Very little of the coverage was about issues or character or qualifications,” Mele said. “The vast majority of the coverage was, ‘He’s winning the polls!'”

Asked whether he believes pursuit of ratings drove TV news coverage of Trump, Carroll said, “of course,” then added, “There needs to be a reasonable examination of how the cable networks, the broadcast networks, how we cover elections. Certainly Donald Trump was the creation of the media.”