Bill O’Reilly in 2015. (Brendan McDermid)

Not surprisingly, Bill O’Reilly isn’t going down without a fight.

The combative commentator has spent months with a team of advisers marshaling his response to the women who have accused him of sexual harassment, allegations that helped end his 20-year run as the king of cable news in April.

After limiting his public comments for months, Team O’Reilly has made the outlines of its strategy clear in recent weeks, and especially since Saturday when the New York Times revealed that the former Fox News host had settled a new allegation by a former network contributor named Lis Wiehl, reportedly for $32 million.

O’Reilly’s basic approach: Denial. Defensiveness. And a bit of dirt.

O’Reilly has called the Times story “a malicious smear” and once again denied any misconduct. “I have been in the broadcast business for 43 years with 12 different companies,” he told former Fox host Glenn Beck on Beck’s radio program on Monday, “and not one time was there any complaint filed against me. Nothing. Zero. So I think my track record speaks for itself.”

Bill O'Reilly, longtime host of Fox News's top-rated show, “The O'Reilly Factor,” was fired from the network in April 2017. His departure came after six women alleged he sexually harassed them. (Peter Stevenson/The Washington Post)

In fact, although none of the disputes have gone to court, O’Reilly and Fox have privately settled with six women who alleged harassment. (O’Reilly paid three of the women, including Wiehl; Fox paid three others.) In each case, O’Reilly said he settled to avoid prolonged publicity that would have harmed his children.

O’Reilly has said he cannot discuss monetary figures because of the nondisclosure terms of the settlements. But he told Beck that the $13 million settlement figure, cited by the Times in a story in April that triggered his downfall, was “wildly wrong.”

In public statements, O’Reilly has blamed many for his troubles, including the news media. On Monday night, he added another suspect: God. In his “No Spin News” podcast, he said, “You know, am I mad at God? Yeah, I’m mad at Him. I wish I had more protection. I wish this stuff didn’t happen. I can’t explain it to you. Yeah, I’m mad at Him.”

In pleading his case to the New York Times last week, O’Reilly said publicity about the allegations against him could harm his family. He suggested exposure of “sexting” claims against former Fox News commentator Eric Bolling might have contributed to the death last month of Bolling’s teenage son. When Bolling objected to this, O’Reilly backed down and apologized on Twitter.

The defensiveness part is O’Reilly’s assertion that the newspaper and other sources are working against him to undermine his attempts to revive his TV career. “The New York Times wants to take me out of the marketplace,” he told Beck, adding: “Media Matters is involved. CNN is involved. That is beyond any doubt.”

Since his ouster from Fox six months ago, O’Reilly has assembled a formidable legal and communications team. The group includes President Trump’s personal lawyer, Marc E. Kasowitz, and crisis-management specialist Mark D. Fabiani, a former special counsel to President Bill Clinton during controversies involving the Whitewater land deal, the White House travel office and campaign fundraising.

The team has researched some of O’Reilly’s accusers and has made some of those findings public in an effort to undermine the women’s credibility.

One investigation involved a temporary clerical worker named Perquita Burgess, who accused O’Reilly of harassing her at Fox in 2008. At one point, Burgess, who is African American, said O’Reilly called her “hot chocolate.” Burgess did not sue, but her allegations received widespread attention when she went public with them in April; she emerged just as Fox’s parent company, 21st Century Fox, was considering O’Reilly’s fate.

O’Reilly’s advisers subsequently found a Detroit police incident report from 2015 in which Burgess was arrested for falsely accusing her boyfriend of assaulting her. A second document involved a tweet sent by Burgess in 2012 in which she expressed an attraction to the actor Laurence Fishburne, saying he “could get every oz. of my hot chocolate.”

Burgess’s attorney, Lisa Bloom, said last month that Burgess’s then-boyfriend declined to press charges against Burgess, and Detroit police and prosecutors took no further action. She said Burgess has used many terms to refer to herself in her tweets, but “that does not give others permission to use offensive language about her. She maintains that Mr. O’Reilly, with whom she had no relationship whatsoever, did not have the right to use racially tinged language about her in the workplace.”

O’Reilly’s team has also released handwritten notes from former Fox anchors Megyn Kelly and Gretchen Carlson in an attempt to mute their criticism of him and to undermine their credibility.

“What a class act you are,” reads one from Kelly, written after O’Reilly had attended a baby shower for her. “. . . You have become a dear friend and I am grateful to have you in my life.”

Kelly’s camp replied that the two notes were written in 2009 and 2012 and that Kelly has questioned O’Reilly’s behavior more recently.

An undated note from Carlson to O’Reilly reads: “Thank you for being the calm in the sea. Thank you so much for supporting me. Thank you for being my friend. It means the world to me.”

Carlson triggered the ongoing sexual harassment scandal at Fox in July 2016 by filing a lawsuit against the network’s co-founder and chairman, Roger Ailes. She later settled for $20 million.

Also in his defense, O’Reilly on Saturday released an affidavit from Wiehl in which she swore under oath that she and O’Reilly have “resolved all of our issues” and that she would “no longer make the allegations” contained in a draft complaint she had drawn up against him a month earlier.

The document does not really clear O’Reilly; it was signed after O’Reilly had agreed to settle Wiehl’s complaint and had paid her an unspecified amount.

Nevertheless, in his interview with Beck, O’Reilly suggested the document vindicated him. “The New York Times should have printed the affidavit up top, but they didn’t do that because it would have wrecked their story, which they had already written,” he said. “We gave them an unbelievable amount of stuff, but they don’t care.” (The Times referred to the document in its story but didn’t publish it in full.)

He added: “All I can hope for is that the American people will see that this is an attack on me for political purposes. It has done enormous damage to me and my family.”