The crew of the Starship Enterprise detects a rogue planet (dubbed Anomaly) orbited by a miniature black hole. This seems to contravene all scientific laws. Assuming that the system is artificial, Captain Kirk leads a landing party to the planet's surface, where they become trapped. The crew find themselves at the center of a galactic conflict, in which an alien race is threatening to invade Federation space. Dr. McCoy, Mr. Spock, and Captain Kirk must participate in a series of trials that will determine not just their survival, but that of the Federation.