Fox News is losing one its biggest stars to NBCUniversal just days after signing a major carriage agreement with the network's owner, Comcast's (CMCSA) .

For 21st Century Fox (FOXA) , Kelly's departure, which was first reported by The New York Times, is yet more fallout from the sexual harassment scandal that rocked the network over the summer and brought down former Fox News chairman and co-founder Roger Ailes.

It was Kelly's decision to come forward with information that corroborated a sexual harassment lawsuit filed in July by former anchor Gretchen Carlson that forced Rupert Murdoch, Fox executive chairman and the network's other co-founder, to arrange for Ailes exit.

Kelly was said to have taken considerable heat from other anchors at Fox News for offering accounts similar to those made by Carlson, New York magazine's Gabriel Sherman reported. In recent weeks, Fox CEO James Murdoch has said he was confident that Kelly, 46, would re-sign Fox News.

Kelly, whose contract runs through July, will host her final show as a Fox News anchor on Friday, said a source close to the matter. 

Comcast shares Tuesday were slipping 1.1% to $68.27 while Fox was rising 1.2% to $28.38.

NBC, in a statement, said Kelly will anchor a new one-hour daytime program that will air weekdays at a time to be announced in the coming months.

"Megyn is an exceptional journalist and news anchor, who has had an extraordinary career," said Andrew Lack, chairman of the NBCUniversal News Group, in the statement. "She's demonstrated tremendous skill and poise, and we're lucky to have her."

Kelly's move to a broadcast rival is sure to have far-reaching political and financial implications for both media conglomerates. Her departure follows a new carriage agreement between the two companies that ends a 15-month blackout of Fox's YES Network, which carries the New York Yankees, to Comcast subscribers.

The blackout meant that large swaths of New Jersey as well as parts of New York and Connecticut were without Yankee games for the 2016 season. The long-running and bitter dispute hurt YES and Fox, which owns about 80% of the regional sports network.

It also prompted an aggressive anti-Comcast campaign by YES, which urged fans to switch to another distributor. But it was never enough to force both companies to come to a quick resolution.

Yet by packaging Fox News as part of its agreement with Comcast, the blackout was ended.

The conservative network famous for its provocative brand of journalism posted a record-breaking year for ratings and revenue, fueled in part by Donald Trump's often unruly yet ultimately successful presidential campaign. Fox News' final yearly average of 2.4 million viewers during prime time and an average 1.4 million each day made the network the country's most-watched cable TV outlet in 2016, even higher than Disney's (DIS) ESPN.

That's particularly significant given that ESPN has long been the most-expensive cable TV network for a pay-TV operator to carry. It's also important given that the overall pay-TV industry is losing customers, albeit at a slow pace of around 1% per year.

The agreement comes at a crucial time for cable TV companies forced to compete for viewers' attention with everything from Netflix (NFLX) and Amazon (AMZN) Prime Video to the online platforms of Facebook (FB) and Snapchat, as well as newer millennial-focused channels such as Vice Media's Viceland.

"The market is saturated and in slow decline," said Bruce Leichtman, principal analyst at the Leichtman Research Group in Durham, N.H. "That's not just a problem for the operators, it's also a problem for the programmers, and maybe even more so."

The pay-TV market, Leichtman said, peaked in the first quarter of 2012. And although the pace of that decline is a source of debate within the industry, no one doubts that total subscribers to cable TV, satellite and digital services is slipping.

Yet while both content companies and pay-TV distributors want to sustain the industry, there's more pressure on the TV companies because consumers have far more entertainment choices.

Ultimately, Comcast agreed to a comprehensive deal with Fox that involved both Fox News and the YES Network. As part of the agreement, Fox will receive $1.52 per subscriber for Fox News, a 6.3% increase from its current rate, according to SNL Kagan, of $1.41 per subscriber. A "somewhat modest" increase, Leichtman said.

While an increase is a positive, it comes as Fox's programming costs are rising at a far higher pace and total subscribers are declining.

In May, Fox Finance Chief John Nallen told investors that the company's cable TV group had budgeted for a 19% increase in expenses largely related to higher costs for sports rights and entertainment programming. In November, Barclays media analyst Kannan Venkateshwar said overall programming costs at Fox were increasing by 8%.

In short, the fee increase at Fox News may be just enough to tread water when compared with programming costs. Of course, Fox News also received a windfall in advertising sales in 2016, offering insight into why the network is expected to post more than $1 billion in profits last year.

"Both content companies and distributors have to acknowledge we're at a different point in the life of this industry," Leichtman said. "Right now, though, Comcast and other distributors are starting to make clear that they're not going to pay the kinds of rates they have in the past."

And that includes payment to a network that no longer employs Megyn Kelly.

Comcast and Facebook are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells CMCSA or FB? Learn more now.

If you liked this article you might like

Politics Hang Heavy Over FCC's Review of Sinclair-Tribune Media

Comcast Dodges Big Social, Moves Watchable In-House

A Sprint/T-Mobile Deal Still Faces Big Hurdles, Especially for Sprint

'The Handmaid's Tale' Emmy Win Is Really Big for Netflix

Disney Gets Bullish Report Aimed at Drowning Out Naysayers