Ekos crisis

A Federation historian's Nazi experiment

Federation historian John Gill tried to bring order to the planet Ekos by modeling its government on Nazi Germany, and the result was a regime bent on destroying the neighboring Zeons.

The Enterprise went to Ekos in 2268 to find John Gill, a respected historian who had been sent there as a cultural observer. They discovered that Gill had broken the non-interference directive by reshaping Ekosian society into a copy of Nazi Germany, believing it could be efficient without its evil. His deputy Melakon had taken real power, kept Gill drugged and was planning to exterminate the people of Zeon.
Kirk and Spock joined the Zeon underground and reached Gill, who denounced Melakon during a broadcast before both were shot. Gill died warning that even a well-meant tyranny was a mistake, and the planet moved toward peace.