On Beta III, the Enterprise found a society controlled for centuries by the computer Landru and freed it, learning what had become of the lost USS Archon.
Searching for the fate of the starship Archon, lost about a century earlier, the Enterprise reached Beta III in 2267. The population lived in placid obedience, interrupted by a violent night called the Festival, all directed by Landru, a computer built by an ancient leader of the same name. People who resisted were absorbed and their minds rewritten, and the computer tried to absorb the landing party.
With the help of an underground resistance, Kirk and Spock reached the computer and convinced it that its control was harming the people it had been built to protect. Landru destroyed itself, and a team was left behind to help the society.