26th episode of the second season of Star Trek: The Original Series
director: Marc Daniels
screenwriter: Art Wallace
Wikipedia