Doctor Who: The Face of Evil (1977)
The Doctor arrives on a planet where two tribes, the savage Sevateem and the technically brilliant Tesh, are at war. He meets Leela, an exile from the Sevateem, and discovers that the tribes' god of evil is apparently himself...