NEW YORK -- The parent company of the Fox News Channel says it knew a news analyst planned to file a sexual harassment lawsuit against Bill O'Reilly when it renewed the popular personality's contract in February.

The New York Times reported Saturday the company renewed O'Reilly's contract after he reached a $32 million settlement with the analyst, Lis Wiehl.

In a statement, 21st Century Fox defended its decision because it said O'Reilly had settled the matter personally. It also said O'Reilly and the Wiehl had agreed the financial terms would be kept confidential.

The company says O'Reilly's new contract had added protections that allowed Fox to dismiss him if other allegations surfaced.

O'Reilly was ousted months later when it was revealed Fox had paid five women a total of $13 million to keep quiet about harassment allegations.

Mark Fabiani, a spokesman for O'Reilly, said in a statement Saturday that after 21st Century Fox fired founding CEO Roger Ailes in 2015 following harassment charges, dozens of women accused scores of male employees at Fox News Channel of harassment. The 77-year-old Ailes died in Palm Beach, Florida, last May.

21st Century Fox paid out close to $100 million dollars to settle all the cases, Fabiani said, adding that in O'Reilly's 20 years working at the channel not one complaint was filed against him by a co-worker, even on an anonymous hotline.

Wiehl's allegations included repeated harassment, a nonconsensual sexual relationship and the sending of gay pornography and other sexually explicit material to the woman, according to people briefed on the matter who spoke to The New York Times.

As part of the terms of their agreement, she signed an affidavit, dated Jan. 17 and obtained by the newspaper, stating that the two sides had resolved their dispute and that she had no claims against O'Reilly concerning any of the allegations in the draft complaint. All photos, text messages and other communications between the two would be destroyed, the newspaper reported.

The Associated Press emailed Wiehl on Saturday seeking comment.

The settlement was by far the largest of a half dozen deals made by O'Reilly or the company to settle harassment allegations against the host, according to the newspaper.

It was reached in January. A month later, 21st Century Fox granted O'Reilly a four-year extension on a $25 million-a-year contract. In April, it fired him.

Fabiani said the newspaper's account was false and taken out of context. The New York Times said it stands by its reporting.

"Mr Fabiani addresses everything but what the story actually says. This article, like our previous reporting on the subject, is accurate and deeply reported and we welcome any challenge to the facts," the newspaper said in a statement to The Associated Press on Saturday.

The most-watched figure in cable TV, O'Reilly has called his firing from the Fox News Channel a "political hit job" and that his network's parent company made a business decision to get rid of him. O'Reilly also has said his conscience was clear in how he dealt with women.

The company said it has taken numerous steps to change its workplace environment.

"21st Century Fox has taken concerted action to transform Fox News, including installing new leaders, overhauling management and on-air talent, expanding training, and increasing the channels through which employees can report harassment or discrimination," Fox said in a statement emailed to the AP. "These changes come from the top, with Lachlan and James Murdoch personally leading the effort to promote civility and respect on the job, while maintaining the company's long-held commitment to a diverse, inclusive and creative workplace."

O'Reilly hosts his "No Spin News" podcast on his website, www.billoreilly.com, contributes to Glenn Beck's radio program on TheBlaze and continues to write books in his bestselling series of historical "Killing" books, including his newest release, "Killing England: The Brutal Struggle for American Independence."