Bill O’Reilly will receive a payout of tens of millions of dollars from 21st Century Fox when he leaves the broadcasting network, sources say.

The controversial cable news host was ousted from his job at Fox News on Wednesday amid mounting accusations of workplace sexual harassment. The network will pay him a portion of his $25-million-per-year contract when he leaves, two well-placed sources tell CNN.

Roger Ailes, the network’s last high-profile dismissal, was paid more than $40 million at the end of his term. CNN sources would not confirm exactly how much Mr O’Reilly would be paid.

21st Century Fox and Mr O'Reilly's representatives would not comment on the payout due to confidentiality agreements.

Mr O’Reilly signed a new, more lucrative contract on 1 March of this year, set to expire at the end of the next presidential election. That was before The New York Times published a damning investigation of Mr O’Reilly’s workplace conduct on April 1.

Mr O’Reilly and 21 Century Fox had paid $13 million to silence women accusing him of sexual harassment over the years, the Times reported.

In the wake of the investigation, two more women later came forward with their own accusations of sexual harassment. Mr O’Reilly decried the accusations as “completely unfounded,” but dozens of advertisers still pulled their spots from his programme.

Mr O’Reilly left abruptly for vacation on 11 April and was expected to return on 24 April. Instead, 21st Century Fox announced on 19 April that their host of more than 20 years would not be coming back.