On an unnamed planet, a race called the Gonds are subject to the mysterious Krotons, unseen beings to whom they provide their brightest intelligences as “companions”. Thara, son of the Gond leader Selris, is the only one of his race to object to this practice. The Doctor, Jamie and Zoe arrive in time to witness the death of one of the chosen companions and intervene to save Vana, the other selected for this fate, using her survival as a means to convince Selris and the Gonds of the malign influence of the Krotons on their society. The Doctor calls it "self-perpetuating slavery” by which the brightest in Gond society have been removed. Similarly, there are large gaps in their knowledge, especially relating to chemistry. This situation has been in existence for many years since the Krotons arrived in their spaceship, polluting the lands beyond the Gond city and killing much of the Gond population.
Thara uses the disquiet of the situation to lead a rebellion and attack the Teaching Machines of the Krotons in the Hall of Learning. This prompts a crystalline probe to appear and defend the Machines, and warn the Gonds to cease their rebellion. Zoe now tries the Teaching Machines and is selected to be a “companion” of the Krotons. The Doctor elects the same fate and both are summoned into the Dynotrope where they are subjected to a mental attack. Zoe deduces that the Krotons have found a way to transfer mental power into pure energy, while the Doctor busies himself with taking chemical samples of the Kroton environment. Circumstances now trigger the creation of two Krotons from chemical vats with the Dynatrope (the Kroton spaceship). The newly created Krotons capture Jamie but are really seeking the Doctor and Zoe, the “High Brains”, who have now left the Dynatrope. It takes Jamie quite some time before he is able to make an effective escape.
Eelek and Axus, two councillors previously loyal to the Krotons, who begin to rally for all-out war with the Krotons, have now seized the initiative in Gond society. The more level headed Selris is deposed, but warns that an all-out attack will not benefit his people. Instead he has decided to attack the machine from underneath by destabilising its very foundation in the underhall. Eelek has Selris arrested and also reasserts control by negotiating with the Krotons that they will leave the planet if provided with the two “High Brains” who can help them power and pilot their ship. Zoe and the Doctor are forced into the Dynatrope and Selris dies providing them with a phial of acid which the Doctor adds to the Kroton vats. Outside, Jamie and the scientist Beta launch an attack on the structure of the ship using sulphuric acid. This two pronged assault destroys the tellurium-based Krotons and their craft. The Dynatrope dissolves away and the Gonds are free at last - choosing Thara rather than the cowardly and ambitious Eelek to lead them.