New York. Twenty-First Century Fox Inc has parted ways with star cable news host Bill O'Reilly following allegations of sexual harassment, the company said on Wednesday.

“After a thorough and careful review of the allegations, the company and Bill O’Reilly have agreed that Bill O’Reilly will not be returning to the Fox News Channel,” the conservative network's parent said in a statement.

The decision, coming after advertisers had begun to flee his show, ends a more than 20-year career at Fox News for O'Reilly, a best-selling author as well as one of the most popular commentators on US television.

In an internal memo to Fox News employees seen by Reuters, Rupert Murdoch called O'Reilly "one of the most accomplished TV personalities in the history of cable news."

Murdoch, who is executive chairman of Twenty-First Century Fox, also wrote the company is committed to "fostering a work environment built on the values of trust and respect."

O'Reilly, who has been off the air on vacation since April 11, said in a written statement he was proud of the "unprecedented success" at Fox.

"It is tremendously disheartening that we part ways due to completely unfounded claims. But that is the unfortunate reality many of us in the public eye must live with today," O'Reilly said in the statement, which was emailed by crisis communications expert Mark Fabiani.

O'Reilly will be replaced in his prime-time lineup by Fox host Tucker Carlson. Carlson's show had been moved earlier this year to replace "The Kelly File" with Megyn Kelly, another Fox News star who left for NBC in January.

The New York Times reported on April 1 that Fox and O'Reilly paid five women a total of $13 million to settle harassment claims. The five women who received settlements either worked for O'Reilly or appeared as guests on his program, according to the New York Times story.

O'Reilly said in a statement at the time that he had settled only to spare his children from the controversy.

O'Reilly's show, "The O'Reilly Factor," is the top-rated show on Fox News. According to ad-tracking firm Kantar Media, it brought in $147.13 million in advertising revenue in 2016. By comparison, Twenty-First Century Fox’s last fiscal year, which ended June 30, 2016, brought in a total of $7.65 billion in advertising revenue.

"The O’Reilly Factor" has been the most watched program on Fox News and was coming off the highest-rated first quarter in its history, averaging 4 million viewers, according to Nielsen.

But after the New York Times report, advertisers including BMW of North America, Allstate Corp, French pharmaceuticals maker Sanofi SA and T. Rowe Price, pulled their advertising from O'Reilly's show.

O'Reilly's exit, which was first reported by New York magazine, follows that of former Fox News Chairman Roger Ailes, who was forced to resign in July after being accused of sexual misconduct by a number of women, including former anchor Gretchen Carlson.

Kelly was also one of the accusers and detailed Ailes' behavior in her best-selling book, "Settle for More." Ailes has repeatedly denied any wrongdoing.

Twenty-First Century Fox had tapped the law firm Paul, Weiss Rifkind, Wharton & Garrison, which also looked into the allegations against Ailes, to investigate O'Reilly's conduct.

Investors seemed to take the news in stride. Shares of Twenty-First Century Fox ended Wednesday's trading on the Nasdaq down less than 1 percent at $30.39 and analysts said the network's viewers would likely remain loyal.

O’Reilly’s departure will not affect Twenty-First Century Fox’s overall profitability, said Brian Wieser, an analyst at Pivotal Research.

“They could literally go dark during the time his program airs and they would still be profitable,” said Wieser.

A bigger issue for investors is what the Murdochs will do to prevent the company being in the headlines again just a few months from now, Wieser said. “That’s bigger than O’Reilly,” he said. “The cultural issue is a big issue.”