Rafe Esquith, whom I have often called the best classroom teacher in the country, has finally won victory over the Los Angeles school board's outrageous firing of him two years ago. The settlement agreement, at least to me, makes clear he was right and the board was wrong.

What I consider the board's capitulation, as first reported by the Los Angeles Times, is a major defeat for its special "Tiger Team," a pack of lawyers and investigators who for a while were kicking scores of teachers out of classrooms for trivial or inexplicable reasons. Not only does Esquith, 63, get the full retirement benefits due him, but the board has agreed to follow procedures that will help repel future surprise attacks on others.

As far as I can determine, no other U.S. school district had ever resorted to such drastic measures, brought on by the board's panic over failure to detect child molesters in some schools. I hope such witch hunts are never repeated anywhere.

I have written several columns and a portion of a book about Esquith. I am obviously biased in his favor. He is barred by the settlement from talking to me about its terms. But he is clearly happy that the cloud over his future is gone and that he can pursue teaching opportunities outside the district.

In March 2015, he was pulled out of his class of fifth-graders from low-income Korean and Hispanic families because a school staffer thought his joke about a naked character in Mark Twain's "Adventures of Huckleberry Finn" was inappropriate. A state commission on teacher credentialing rejected that complaint. But the board dismissed him and released accusations of inappropriate touching of minors, inappropriate photos and videos on his computer, and ethical and policy violations in the nonprofit group that funds his activities.

Esquith sued in state and federal courts. A state judge and a state appeals court rejected school board requests to drop the case. The board appears to have surrendered after realizing the students Esquith was supposed to have harmed and their parents rejected the allegations as idiotic misinterpretations of jokes and literary references.

The board voted 6 to 1 on Sept. 12 to pay Esquith's attorneys an estimated $150,000 to cover a portion of their legal fees. I think this was an obvious acknowledgment of the board's guilty conscience. Elected boards hardly ever admit they are wrong. The money seems small compared to the district's $7.5 billion budget, but I can't imagine they would have paid if they thought they had a good case.

I am sure there are L.A. school officials who don't consider this a victory for Esquith, but the district spokeswoman did not respond when I asked for comment.

Ben Meiselas, part of the legal team representing Esquith, said most of the money will be donated to a charity "inspired by the teachings of Rafe." He said the settlement is a major win for all L.A. teachers. It requires that those accused of wrongdoing receive written notice of their legal rights and counseling.

The agreement also guarantees Esquith and his wife, Barbara Tong, the lifetime health benefits earned by his long tenure at Hobart Boulevard Elementary School.

Esquith took his students deep into math, economics and literature, including his beloved pop music Shakespeare productions, which he has continued at an off-campus location since his firing. He has written four books and become an icon for other teachers, including a huge fan base in China.

For more than 30 years, Esquith followed a 12-hours-a-day schedule, with students flocking to his classroom on vacations and weekends. Teachers that sacrifice are often unpopular in their districts because they make colleagues look lazy.

But I have never seen a great educator subjected to this much abuse. I hope the school board doesn't try this on anyone else like him ever again.