Zxolar suddenly collapses and Doctor McCoy tries to help him, but an energy field surrounds the doctor's head and he runs into a wall and disappears. The landing party searches for McCoy, to no avail, and Zxolar is beamed to the "Enterprise". Doctor Chapel attempts to help him, but the energy field appears around her and she passes out. Xon and Kirk discuss the energy and realize it wants Zxolar to die, as it has attacked anyone who helps him. The pair beam back down the planet to investigate the palace in which they met Zxolar and discover an archive that shows them the original agreement made by six philosophers, including a much younger Zxolar, and Komether a thousand years earlier. They note one of the philosophers is Zxolar and Komether is the energy being that attacked the two doctors. As in the later version used on "Star Trek: The Next Generation", the agreement was that the being would correct the pollution of the planet in return for ownership of the planet a thousand years later. Xon and Kirk decide to move Zxolar to a life support table and ask for other volunteers, as it is apparent that Komether will attack them as they attempt to save Zxolar. Scotty, Sulu and Chekov all volunteer as well, and the alien disables each of them as they move Zxolar. It is only because of Xon's strength as he is being attacked that they manage to attach Zxolar to a life support machine and his life signs immediately improve. Zxolar tells Kirk about the contract, who retrieves it from the planet's surface and challenges it. Komether appears and agrees to a trial with the "Enterprise"s computer acting as an impartial judge. Kirk realizes that Komether was created by the six philosophers, and as the last remaining, Zxolar is in control of it. Zxolar manages to defeat the creature using his will and releases the stunned crewmen. He finds that McCoy was trapped within the wall and releases him, too. The "Enterprise" departs shortly thereafter. The story was once again brought up during a story pitch for the season three of "The Next Generation", and it was modified by several staff writers. Michael Piller made several changes, including making the devil character female. Marta DuBois was cast as Ardra, after Stella Stevens and Adrienne Barbeau were also considered. Paul Lambert had previously appeared in the episode "" as a member of the Aldean race.