The Enterprise searches the reportedly primitive and warlike planet, Ekos, for the missing Federation cultural observer, Professor John Gill (David Brian). When Kirk (William Shatner) and Spock (Leonard Nimoy) beam down, they find the Ekosians have turned into a Nazi society, with Gill as their Fuhrer, and are at war with the peaceful people of neighboring planet, Zeon. They steal uniforms to enter the headquarters; but when Spock is forced to remove his helmet, his ears betray them and they are led straight to the torture chamber. After a flogging as Zeon spies, they manage to escape with a Zeon prisoner (Richard Evans), who takes them to the Zeon resistance. The resistance tests them, and plots with an Ekosian defector (Valora Noland) just to reach Gill, posing as a Nazi propaganda film crew. Once they enter inside, they discover things are not quite as they appear.