Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Megyn Kelly and NBC News have agreed to terms under which the high-profile TV host will leave the company with the remainder of her $69 million contract, according to a source familiar with the agreement.

The news comes after months of negotiations over parts of Kelly’s long-term contract following her removal in October from the 9 a.m. ET hour of NBC’s “Today.” Her morning show, “Megyn Kelly Today,” was cancelled after the anchor made comments about wearing blackface as part of a Halloween costume debate.

“The parties have resolved their differences, and Megyn Kelly is no longer an employee of NBC,” NBC said in a statement.

Kelly apologized for the comments directly after the show aired and then on air the next day but was criticized by several NBC News personalities, including Al Roker, who were upset with her over the statements.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Kelly’s move to NBC News from Fox News in 2017 was closely followed within the media industry, in part because she became one of the most highly paid people in the news business with an estimated salary of $69 million over three years.

Kelly will receive a payout of up to $30 million, according to a source familiar with the deal who was not authorized to speak publicly on the matter.

Prior to the blackface controversy, Kelly’s morning show had suffered from a ratings dip compared to the hour’s previous hosts, Tamron Hall and Roker. The time period now features a rotating roster of “Today,” show anchors including Dylan Dreyer, Sheinelle Jones, Craig Melvin, Al Roker and others.

The new hour, which is a more seamless continuation of the “Today” show, has seen an 18 percent increase in viewers over Kelly’s average audience to 2.9 million.

Despite the ratings issues, Jason Damata, an analyst for TVREV, an independent media consultancy, said Kelly’s show “was considered premium inventory” for advertisers, which included Tide, Cheerios, WholeFoods, Walgreens and Neutrogena. The show generated $188.7 million in 2018, according to an estimate from TV measurement firm iSpot.tv.

Kelly remains one of the most-recognized news personalities, according to Marketing Evaluations the Q Scores Company, which measures the public’s recognition and sentiment of notable people. In October, the measurement firm found that 43 percent of those asked were able to recognize Kelly, below CNN’s Anderson Cooper (62 percent) and close to “NBC Nightly News” anchor Lester Holt (46 percent).

Kelly, however, ranks well below her peers in terms of public sentiment, with only 8 percent of those having a positive view of her compared to 19 percent for Holt and 16 percent for Cooper.

It was not immediately clear if Kelly’s deal to leave NBC prevented her from immediately joining another network or cable TV operation, though she told the celebrity news website TMZ on Thursday during an impromptu interview on a New York City street corner that she will “definitely” be back on TV.

CORRECTION (Jan. 11, 2019, 10:35 p.m. ET): An earlier version of this article misspelled the first name of an NBC anchor. Her name is Sheinelle Jones, not Sheneille.