While Deshowitz claims he is in a war against cancel culture, Americans on both sides of the aisle seem to feel like the scorn is justified.

For all my professional life I have fought for the rights of others. Then, eight years ago, I was accused of sexual abuse and found myself fighting for my own rights.

The accusation against me was unique: In other “Me Too” and related cases, the accused and the accuser knew each other. Sometimes they were lovers, office colleagues or friends. The issue was often one of degree: Was there consent? Did the flirtation amount to harassment?

My case was different: The issue was black and white; there was no gray area. Either I was totally innocent or guilty.

Now my accuser has recognized she may have made a mistake in identifying me as one of the men with whom she had sex. She has dismissed all claims against me and has ended the litigation. The accusation against me, it turns out, may have been a case of mistaken identity. The bottom line is — and as I have asserted from the very beginning — I did absolutely nothing wrong.

This case of mistaken identity has taken a terrible toll on me and my family. It has silenced my voice on behalf of Israel and other causes so important to me, especially now with recent rises in anti-Semitism and anti-Zionism. As a direct result of this mistaken allegation, I was not invited to speak at Temple Emanu-El, the 92nd Street Y, the Ramaz School and several universities.

I have fought against the excesses of “cancel culture” not only because I was a victim of it but because it poses a great danger to freedom of speech for the speakers and for those who are denied the opportunity to listen to them.

I consistently and vehemently denied these allegations, not only to restore and protect my own reputation but to combat the growing recent phenomenon of guilt by accusation in the court of public opinion. I wrote a book by that title to warn readers of the dangers of crediting accusations without examining the evidence — or lack thereof. I will continue to fight hard on behalf of civil liberties, free speech, due process and the right to counsel.

In one respect, it was easy for me to fight back: I have never engaged in any sexual misconduct. That is why I have sought, and will continue to seek, the unsealing of every document, deposition, recording and video in my case — over the strong objections of my opponents. Others, even those falsely accused of specific misconduct against a particular individual, cannot fight back without risking disclosure of other misconduct against other people. I have no such fear.

I was repeatedly advised to remain silent so that the accusation could “fade away” with the passage of time. That was not an option for me; I wanted my name cleared.

We live in a dangerous time of deep divisiveness, reflected both in the just-concluded election and in important institutions such as universities and the media. People tend to take sides. Because I defended President Donald Trump against what I regarded as an unconstitutional impeachment, many people, including former friends, believe I am on the wrong side of history. They hoped I was also on the wrong side of the accusation against me. This hope was magnified by the fact that I represented perhaps the most despised criminal defendant in recent history, Jeffrey Epstein.

I am proud of my legal representation of controversial, even detested, individuals, and I plan to continue to provide it, in the spirit of John Adams, who defended the despised British soldiers accused of the Boston massacre.

I wish I had never met Epstein, but I did the right thing in defending him, especially because he was so hated. People can disagree with my choice of clients, and as a law professor for a half-century, I welcome reasoned disagreement. But no one should misuse these disagreements as a justification for blindly supporting accusations in a rush to judgment.

I hope my case becomes an object lesson in the continuing need for a presumption of innocence until and unless proven guilty. The “Me Too” movement has generally been a force for good, exposing real predatory sexual misconduct by the guilty. But like every good movement, it is subject to misuse and abuse by the few who would exploit it for their own benefit. We need reliable processes for distinguishing the latter from the former.

Since the biblical Joseph was falsely accused by Potiphar’s wife, civilizations have struggled to strike the appropriate balance in recognizing that accusations can be truthful or false. I commend Virginia Giuffre, who suffered much at Epstein’s hands, for having the courage to come forward and admit she may have made a mistake in identifying me. Now we can both move on with our lives.

Alan Dershowitz is professor emeritus at Harvard Law School and the author of “Guilt by Accusation” and “The Price of Principle.”