Megyn Kelly is leaving Fox News, where she had been one of the network’s biggest stars, for NBC News.

At NBC, she’ll host a weekday daytime show, an in-depth Sunday magazine and take part in the network’s coverage of high-profile events. She was at the 21st Century Fox (FOX) TV network for 12 years and gained notoriety after she clashed during presidential debates with Donald Trump.

According to The New York Times, NBC News President Andrew Lack was able to convince the 46-year-old Kelly to leave Fox News, even though it seemed doubtful that NBC or other networks could match the $20 million annual compensation that Fox offered her to stay.

Kelly’s contract isn’t due to expire until the summer, and it isn’t clear if Fox will allow her to start ahead of time, the newspaper said. Financial terms of Kelly’s deal were not disclosed. NBC News didn’t respond to requests for comment for this story.

Get Breaking News Delivered to Your Inbox

In a statement, 21st Century Fox Executive Chairman Rupert Murdoch said: “We thank Megyn Kelly for her 12 years of contributions to Fox News. We hope she enjoys tremendous success in her career and wish her and her family all the best.”

“While I will greatly miss my colleagues at Fox, I am delighted to be joining the NBC News family and taking on a new challenge,” Kelly said in a statement on her Facebook page. “I remain deeply grateful to Fox News, to Rupert, Lachlan and James Murdoch, and especially to all of the (Fox News Channel) viewers, who have taught me so much about what really matters.”

Kelly’s tenure at Fox News has been rocky since she gained notoriety for questioning now President-elect Trump during a 2015 presidential debate about why he called women he didn’t like “fat pigs, slobs, and disgusting animals.” When Trump joked that he said mean things only about his longtime nemesis Rosie O’Donnell, Kelly responded that his remarks were targeted more broadly than at just the stand-up comedian.

Kelly later complained about getting death threats from pro-Trump supporters.

She wound up in the headlines again last summer when former Fox anchor Gretchen Carlson accused longtime Fox News Chairman Roger Ailes of sexual harassment in a lawsuit. Several high-profile Fox hosts such as Bill O’Reilly, Maria Bartiromo and Sean Hannity publicly defended Ailes against the accusations. O’Reilly even called the 76-year-old Ailes “the best boss I ever had.”

Kelly, however, broke ranks and told an internal Fox investigation that Ailes had made unwanted advances toward her when she was starting out her career. More than a dozen other women made similar claims, and Ailes was eventually forced to resign. Ailes has repeatedly denied any wrongdoing.

Lachlan and James Murdoch, sons of Rupert Murdoch, reportedly were keen on keeping Kelly at the network. The elder Murdoch took over from Ailes as the head of Fox News on a temporary basis.

“It’s a loss for Fox,” said Robert Thompson, director of Syracuse University’s Bleier Center for Television & Popular Culture, who called Kelly a “bona fide news celebrity.” He added that “There has been a lot of animosity between Megyn Kelly and Fox, and I have a feeling that they aren’t terribly surprised” by her decision.

Moving to NBC News will greatly increase the size of Kelly’s audience. Fox News averaged 2.4 million viewers in prime time, the most of any cable network in 2016. However, “NBC Nightly News” attracted more than 9 million viewers during the week of Dec. 19, topping rivals ABC, which is owned by Walt Disney (DIS) and CBS (CBS), the parent company of CBSNews.com

NBC’s move isn’t without risks. High-profile talent such as Katie Couric and Anderson Cooper tried and failed to attract audiences in daytime. NBC’s magazine show “Rock Center” was canceled in 2013 after two seasons. Plus, Kelly faces a challenge in switching from cable to a wider audience on a broadcast network.

“One has to wait and see how these transitions get made,” Thompson said. “Sometimes you move from one place to another, and it’s a triumph. Sometimes it’s not. They aren’t going to put Megyn Kelly into a daytime show that people are going to confuse with a Fox show, but at the same time they would be wise to play upon the strengths for which she is known.”

Kelly, who has a law degree, could wind up with high-profile assignments like anchoring the news or appearing on the “Today” show given her experience and credibility with the audience, according to Thompson.

“Now that she’s with NBC, she could potentially be popping up on MSNBC,” noted for being the liberal answer to Fox News, “which is funny,” Thompson said.