Megyn Kelly finalized her exit from NBC News on Friday night — after months of difficult negotiations over whether she could ever talk about the backstabbing behavior from network brass and staffers.

Kelly finally resolved her exit three months after she was axed as host of the 9 a.m. hour of “Today,” landing her a $30 million payout to take her salary to the agreed amount in her contract — a total of $69 million.

The former Fox News host lasted just 18 months at NBC News, but Page Six learned during the course of her negotiations that the sticking point over her exit deal was not her astronomical salary — but her non-disclosure agreement to keep quiet about the network and its staff, which she eventually signed.

One NBC insider said, “In many ways, Megyn was set up by Andy Lack [NBC News honcho who signed her to the network] to fail. A warm and fuzzy show was never right for her. Once Megyn’s salary was made public, the knives were out. Other network talent went in demanding a raise equivalent to Megyn, and were not happy to be told ‘no.’”

The insider said the hostility toward Kelly continued, with her never being invited to substitute for the “Today” hosts between the 7 a.m. and 9 a.m. hours, and handovers becoming increasingly tense. She was not invited to join the NBC team for the Olympics, substitute on the “Nightly News” or take part in events like the Christmas tree lighting.

see also

A second insider added that relations between Kelly and NBC brass went further south in September when she called for an independent legal investigation of the network over its decision to not run Ronan Farrow’s Harvey Weinstein investigation. Farrow took the story to the New Yorker, winning a Pulitzer Prize.

Then in October, Kelly further ruffled feathers at NBC by saying in an interview that she didn’t believe former network golden boy Matt Lauer could make a TV comeback because “I know too much that others don’t know.”

So in Kelly’s exit negotiations, NBC was “super sensitive” about getting her to agree to stay silent. “Look at what she was able to say when she was in the building, imagine what she might want to say when let loose,” the second insider added.

An NBC insider added: “Seems like post-breakup euphoria at 30 Rock. There’s a great team in place, ratings jumped double digits and the audience is responding enthusiastically. Everyone is happy to have turned a page in the new year.”

Kelly has said she plans to return to TV news in time for the 2020 election, if not sooner.