Bill O'Reilly, shown in 2015, appeared as a guest on former colleague Sean Hannity's show Tuesday.

In January, barely six months after Fox News had ousted chairman Roger Ailes in a sexual harassment scandal, top-rated Fox host Bill O'Reilly reached a whopping $32 million settlement with a longtime network analyst to settle new sexual harassment allegations, The New York Times reported Saturday, quoting two people briefed on the matter.

After the settlement, 21st Century Fox — the Fox News parent company — struck a new four-year, $25 million per year contract with O'Reilly to continue as host of The O'Reilly Factor.

At the time, Rupert Murdoch and his sons, Lachlan and James, the top executives at 21st Century Fox, had made a business calculation to stand by O’Reilly despite the harassment dispute, the newspaper reported.

They were worried about the company's image in the wake of the Ailes scandal and concerns over the imminent departure of high-profile anchor Megyn Kelly, the Times said.

Although the $32 million deal has not been previously made public, 21st Century Fox acknowledges that it was aware of the woman’s complaints about O’Reilly, the Times reported. These included allegations of repeated harassment, a nonconsensual sexual relationship and the sending of gay pornography and other sexually explicit material to her, according to the people briefed on the matter, the Times reported.

The purported settlement is at least the sixth such agreement cut by O'Reilly. In April, after the Times had reported on five similar deals, Fox severed ties with O'Reilly

The Times said the $32 million settlement with Lis Wiehl was more than three times the amount of any of O’Reilly’s previously known deals. In 2004, he had settled a lawsuit with a producer, Andrea Mackris, for about $9 million. Harassment settlements involving O'Reilly that have become publicly known total about $45 million.

"Interviews with people familiar with the settlement, and documents obtained by The New York Times, show how the company tried and ultimately failed to contain the second wave of a sexual harassment crisis that initially burst into public view the previous summer and cost the Fox News chairman, Roger Ailes, and eventually Mr. O’Reilly, their jobs," the newspaper said.

Amid the turmoil, 21st Century Fox had been facing legal and regulatory pressure, particularly its need to improve its image while seeking approval from British regulators to buy the European satellite company Sky.

In addition, federal prosecutors were looking into the network’s handling of sexual harassment complaints against Ailes and had asked for material related to allegations involving O’Reilly, the Times reported, quoting an internal Fox email obtained by the newspaper.

Six days after Fox's general counsel, according to the email, informed the Murdochs that details of the January settlement were expected to become public, O'Reilly was fired.

In a statement, 21st Century Fox said it was not privy to the amount of O'Reilly's January settlement with 15-year Fox News analyst Wiehl, and regarded it as a personal issue between the two of them.

Mark Fabiani, O'Reilly's representative, issued a statement on his behalf Saturday saying that once again the Times has "maliciously smeared" the former Fox news host and failed to print a sworn affidavit from Wiehl, who was described as O'Reilly's former lawyer, "repudiating all allegations against" O'Reilly.

"The Times ignored that evidence, sworn under oath, and chose to rely on unsubstantiated allegations, anonymous sources and incomplete, leaked or stolen documents," the statement said.

The statement said that after Ailes was fired, dozens of women accused scores of male employees at Fox News of harassment.

It said 21st Century Fox settled "almost all these cases," paying out close to $100 million. Fox News Corp. then signed O'Reilly to a "record-breaking new contract after the company had analyzed and considered all allegations against him."

In what the Times described as a "combative and defiant" O'Reilly, the former Fox host said in an interview on Wednesday that there was no merit to any of the allegations against him. “I never mistreated anyone,” he said, adding that he had resolved matters privately because he wanted to protect his children from the publicity.

“It’s politically and financially motivated,” he said of the public uproar over allegations against him, “and we can prove it with shocking information, but I’m not going to sit here in a courtroom for a year and a half and let my kids get beaten up every single day of their lives by a tabloid press that would sit there, and you know it.”