Claire Enders, the founder of Enders Analysis, said she was sure the decision to dump the right-wing presenter was influenced by UK regulator Ofcom being poised to rule on whether Mr Murdoch and his sons James and Lachlan would be ‘fit and proper’ owners of the satellite broadcaster.

Mr O’Reilly, fired shortly before shaking hands with the Pope, amid a slew of disputed claims that included allegations he told one producer to buy a vibrator and sounded as if he was masturbating while on the phone to her, had been Fox News’ most-watched presenter.

The O’Reilly Factor had been America’s biggest prime-time cable news show, with an average of 3.98m viewers a night seemingly enjoying such moments as Mr O’Reilly stressing that the slaves who built the White House were “well fed with decent lodgings” or asking Donald Trump: “How are you going to get jobs for them [black people]? Many of them are ill-educated and have tattoos on their foreheads.”

According to one estimate, the show generated $446m (£348m) in advertising revenue between 2014 and 2016.

Bill O'Reilly fired by Fox: His most controversial on-air moments

But even those sums may have paled into insignificance compared to the amount of money at stake in the Murdoch empire’s £11.7bn bid for the remaining 61 per cent of Sky that it does not already own.

“I’m sure it [the impending Ofcom ruling] was a factor,” Ms Enders said. “They can’t possibly need another scandal of corporate governance on how they deal with Bill O’Reilly.

“They don’t need any questions over the good old boys network and how Rupert Murdoch puts his pals first.”

As reports suggested that Rupert Murdoch, 86, had wanted to stand by O’Reilly but had been talked out of it by his sons, Ms Enders added: “It’s a generational change: James Murdoch [CEO of 21st Century Fox and chairman of Sky] wants to run the business in a conventional and transparent way – and he’s absolutely right, because that’s what Ofcom is looking for: someone whom they can trust to run a business in a conventional way, following normal rules and regulations.”

The bid for Sky, submitted by 21st Century Fox, the parent company of Fox News and the current owner of 39 per cent of Sky shares, has already come under fire in the UK.

It has generated fears that by wholly owning Sky, Britain’s dominant pay-TV operator, as well as controlling the Times, Sunday Times and Sun newspapers, the Murdoch empire would be able to wield excessive influence over the British media.

Despite the British media regulator Ofcom insisting on strict impartiality rules, there had also been fears of a ‘foxification’ of Sky, with some suggesting the UK broadcaster might emulate the US news channel’s unswervingly right-wing stance on just about everything.

In March the Culture Secretary Karen Bradley referred the takeover bid to Ofcom, which is now due to report by May 16.

So when the O’Reilly story broke at the start of April, critics renewed their calls for Ofcom to block the Sky bid.

Hours after being sacked - while on holiday in Italy - Mr O'Reilly was shaking hands with the Pope (L’Osservatore Romano)

Among the most prominent critics was Lisa Bloom, a US lawyer representing one of Mr O’Reilly’s accusers, who wrote to Ofcom on April 11.

In a reference to the Murdochs’ previous attempt to take over Sky, which was scrapped in 2011 after their corporation’s newspaper the News of the World became engulfed in the phone hacking scandal,Ms Bloom wrote: “The similarities between the current harassment scandal and the phone-hacking scandal reveal the company’s approach to business and management – a lack of oversight, intervention, and decency.”

Mr O’Reilly, who had been on a reported $18m (£14m) salary, has strongly protested his innocence and called all the claims against him “completely unfounded”. But the difficulties in retaining the star presenter were compounded by the fact that last summer Fox News’ founding chairman Roger Ailes had been forced out by sexual harassment allegations – which he too has denied.

“Keeping Bill O’Reilly,” said Ms Enders, “would have meant a festering scandal and questions about why the management of Fox wasn’t taking action against him.

“It will reflect well on James Murdoch and the management of 21st Century Fox that they have taken action as soon as possible.”

Bill O'Reilly says slaves who built White House were 'well fed and cared for'

Ms Enders stressed that the imminent Ofcom ruling was not the only factor in the decision to dump Mr O’Reilly. After the allegations about him first surfaced, up to 50 major companies, including GlaxoSmithKline, Mitsubishi Motors, BMW and Ainsworth Pet Nutrition, pulled their advertising from his show. Some have suggested this may have tempted the Murdochs to show the same kind of apparent ruthlessness as when they closed the News of the World in what looked like an attempt to limit the damage caused by the phone hacking scandal.

“There were virtually no ads on his shows for two weeks,” said Ms Enders. “Advertising boycotts are very expensive and will tend to get rid of even the biggest star.”

In comments that may surprise some critics of the Murdoch family, Ms Enders also suggested that James Murdoch, 44, may genuinely have wanted to send a message to the Fox workforce that sexual harassment was unacceptable.

“I think he genuinely cares about that,” said Ms Enders. “Rupert Murdoch may not care at all, but James genuinely cares about feminism. He is someone who has got the attitude of a 44-year-old, not an 86-year-old.”

“Sky,” she added, “Has the highest number of senior women in any business I deal with, bar none. And who created Sky? James Murdoch.”

Ms Enders agreed with other commentators who suggested that Fox News would weather the storm of Mr O’Reilly’s departure, because in the past viewers had shown more loyalty to the right-wing channel than to its individual stars.

Ms Enders said: “As Sir Alex Ferguson once said: ‘No player is bigger than the team’. When Roger Ailes left last year, people said Fox News would collapse. But their ratings went up and so did their income.