Updated at 5:27 p.m. ET

Bill O’Reilly, the pugnacious host of O’Reilly Factor, whose diatribes against political correctness and attacks on those he regarded as “pinheads” enraged his liberal opponents and made Fox News a ratings powerhouse, will not be returning to the network, 21st Century Fox announced Wednesday. The move came amid an exodus by advertisers following allegations O’Reilly, 67, and the network paid about $13 million to settle claims by five women that he sexually harassed them. His departure is immediate.

“After a thorough and complete 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 network said in a statement.        

Rupert Murdoch, Fox News’s acting CEO, in a message to employees said:

In a separate statement, O’Reilly said that while he was proud of what he’d achieved over two decades at the network, “It is tremendously disheartening that we part ways due to completely unfounded claims. But that is the unfortunate reality that many of us in the public eye must live with today.”

Just last week, as the allegations against him piled up, O’Reilly, the top-rated host in cable news, remained confident. He had reason to be: His audience had grown during the scandal and he had recently signed a new contract worth more than $20 million per year. O’Reilly announced on air he was going on a previously scheduled vacation and would return April 24. (He was seen at the Vatican on Wednesday meeting with Pope Francis.) Until then the network hadn’t commented on air about a report published in The New York Times on April 1 about claims against O’Reilly and settlements that were paid out. But in the aftermath of the article, Gabriel Sherman reported in New York magazine that the law firm Paul, Weiss, Rifkind, Wharton & Garrison, hired by 21st Century Fox to investigate Roger Ailes, Fox News’s ousted CEO, was looking into O’Reilly’s behavior. O’Reilly has denied the allegations against him, and on Tuesday his lawyer called them a “brutal campaign of character assassination that is unprecedented in post-McCarthyist America.” He blamed the campaign on “far-left organizations bent on destroying O’Reilly for political and financial reasons.”

Still, the allegations published in the Times resulted in more than 50 high-profile advertisers fleeing the show, potentially costing Fox tens of millions of dollars in revenue. That, combined with daily protests outside Fox News’s New York City headquarters, and frustration among the network’s female staff over what many regarded as problematic behavior gone unchecked, as well as a fresh allegation against O’Reilly this week, ultimately persuaded the Murdochs to let go of their most bankable star.

News reports initially said Murdoch and his sons, were split on how to deal with O’Reilly. He was one of the stars who took the upstart network that was founded in 1996 and turned it into a ratings behemoth that is arguably the most influential American media organization. Fox News executives such as Bill Shine, its co-president, had worked to keep O’Reilly, hoping the storm over the allegations would pass. James Murdoch, the 21st Century Fox CEO, reportedly wanted O’Reilly out, while his father, Rupert, and Lachlan, his older brother who is executive co-chairman of News Corp and 21st Century Fox, were more inclined to keep him. In a statement last week, Rupert Murdoch told Fox News staff he was pleased with the network’s ratings, but did not mention its biggest star. Then this week came what many media-watchers viewed as the end for O’Reilly: a report in the Murdoch-owned Wall Street Journal with the headline: “Fox Is Preparing to Cut Ties With Bill O’Reilly.” After that the end was swift.

Fox also announced that Tucker Carlson, who hosts Tucker Carlson Tonight on the network, will take over O’Reilly’s slot at 8 p.m. ET. During his absence, a slate of guest hosts appeared on the show, including  Dana Perino. O’Reilly’s exit from the network comes almost a year after the ousting of Roger Ailes, Fox News’s founding CEO. Ailes was given a $40 million parachute and pushed out amid similar charges against him, including by Gretchen Carlson, a onetime co-host of Fox & Friends, the network’s morning show. It has been a tough year for the network, which coupled with the loss of O'Reilly and Ailes, also lost Megyn Kelly, a rising star on Fox, who went to NBC.