The U.S.S. Enterprise goes to pick up research personnel on the second planet of the star Minara. While Kirk, Spock and McCoy are on the surface, a radiation storm endangers the starship and Scotty takes the Enterprise out of orbit, sure that the planet's atmosphere will protect the landing party from radiation.
The three officers find themselves in an underground chamber shared with a mute humanoid which McCoy names "Gem." Two other humanoids, different from Gem, appear to them. They tell the men they are Vians, and take Kirk as a test subject to torture. He is assured, however, that it isn't he who is being tested. Gem, who turns out to be a fully functional empath, heals Kirk's wounds. The Vians tell the captain he must choose one of his men to be the next text subject. Each man volunteers, but McCoy wins, managing to anesthetize both Spock and Kirk, and is taken away by the Vians.
When he is returned to them, McCoy is near death. Gem attempts to cure him, but is frightened by the severity of his injuries. The Vians explain to them that they are testing Gem to see if her people are worthy as a species to be saved from their doomed sun. They are testing Gem's capacity for compassion and self-sacrifice. Overcoming her fears, Gem heals McCoy and the Vians decide that her species is to be saved. The officers are returned unharmed to the U.S.S. Enterprise.