Erich Martel, one of the hardest-working D.C. teachers ever, received an e-mail last month from a former student. The man said he was switching from a successful business career to research in ancient history, in part because of Martel, “the best history teacher I ever had.”

That happens often to Martel, 68, an Advanced Placement history instructor. He has been teaching for more than 40 years, mostly at Wilson High School. His post-AP-test classes on the Vietnam War are famous, first for insisting on study during the usual late May and June playtime, and second for thrilling his audience with visits by Vietnam veterans and war opponents such as former senators Eugene McCarthy and George McGovern and prisoner of war Everett Alvarez Jr.

Yet, Martel was forced to retire last summer after a long campaign to get rid of him. He had too much energy and investigative zeal for his supervisors’ comfort. It also didn’t help that he was a school representative for the Washington Teachers Union.

His AP courses were taken away after he exposed many D.C. high school graduation rule violations. He persevered and got his AP classes back. He was involuntarily transferred to a school across town after his principal told him his anti-cheating measures, such as small type on tests, created “an expectation that students will cheat.” But he embraced his new school and worked hard for its students.

One of his new classes was full of behavior problems, and he was judged minimally effective. He filed a grievance, charging procedural violations, but realized the glacial grievance process would leave him with no job in the schools he loved. So he took the retirement he had passed up many times before.

That 2010 involuntary transfer of Martel from Wilson to the Phelps Architecture, Construction and Engineering High School in Northeast raises an intriguing issue for those of us who admire Martel but realize he can hurt a principal’s ability to unite a campus. The official reason for the transfer was “significant educational philosophy differences” with Wilson Principal Peter Cahall.

I had never heard that one before. We still don’t know if it’s legal because Martel’s grievance against that decision has not been heard yet. But it might make sense. The best public schools select great teachers to be principals and give them the power to hire and fire staff members so they can create a team that lifts the building to new heights. A contrarian such as Martel might not fit, but that doesn’t mean he should be tossed out of the school district.

Phelps sits on a hill overlooking the Anacostia River next to Spingarn High School, which could have used an experienced and knowledgeable social studies teacher. I have spent enough time at Spingarn to think that an engaging and challenging AP U.S. history class, Martel’s specialty, might have thrived. His investigative skills would also have qualified him as a great journalism teacher.

As happens in many organizations, the people who care the most about doing things right often become, at least for the people in charge, just too tiresome to tolerate.

It is no surprise that D.C. school leaders did not have a big going-away party for Martel. But there was a moment he can savor. Just before he left Wilson, the school had an alumni event.

The next day, Martel found a message chalked on his blackboard from a member of the Class of 1988:

“Mr. Martel, Thank you for all your efforts in history class. So sorry I was too immature to be able to learn from you.”

Some of us wish the people who forced him out had been more mature themselves. But he gave the city and its students many good years. Now that he is free of any administrative supervision, misbehaving D.C. principals better be careful.