The Magicks of Megas-Tu

Exploring the center of the galaxy, the very heart of creation, the Enterprise is caught inside an energy/matter tornado and all computer systems fail. A being named Lucien appears on the bridge, repairs the ship's systems and takes the crew to explore his planet, Megas-Tu. On this planet, what we would consider to be magic is normal. The Megans are an ageless species that had, at one time, lived on Earth, and were responsible for the legends about witches. They decide to put Kirk and crew on trial for the crimes of mankind.