Teenagers Jimmy Forbes and Jenny Wilson fight their way through the crowd and take their seats in the front row of the theatre. Jimmy is delighted as they’re in the best place to join the ice cream queue during the interval. The curtain pulls back and the audience starts to applaud as the play begins…
Suddenly the TARDIS materialises on the stage. Jimmy is impressed by the special effects and wonders how it was achieved. The door to the police box opens and a man emerges who promptly collapses to the floor. Although Jimmy thinks it’s probably just part of the show, Jenny is convinced the man is genuinely ill and wants to help him. She runs from her seat and climbs up onto the stage, followed reluctantly by Jimmy. The two youngsters help the man to his feet, but he insists on going back inside the police box so they carry him through the door.
Jimmy and Jenny are shocked to find themselves in a futuristic looking control room that’s bigger on the inside than the outside. Jimmy believes it must be achieved by mirrors, but then the doors close behind them and the sound of the TARDIS engines fill the air. The man collapses to the floor again and - to their amazement, his face begins to change before their eyes. Seconds later, the man has taken on a completely new appearance. He immediately begins checking the controls, then he tells the youngsters that the Time Lords are steering the ship by remote control and complains that they didn’t have the politeness to ask first. Jenny tells the man his face is different, but when he looks at himself in a mirror, he seems reasonably satisfied with the result. He quickly explains to them the concept of bodily regeneration and tells them he was badly wounded in an ambush while on an archaeological expedition to the ruined planet of Karn. He produces a large crystal, like a diamond, which he says he found there, and says he only just managed to get back to the TARDIS and set the course back to Earth. He can’t remember anything after that, but obviously his injury must have triggered off a regeneration.
Jenny and Jimmy introduce themselves and the man greets them warmly. He tells them he’s called the Doctor and says they’re inside his space-time ship, the TARDIS. He demands to know what they’re doing here as he doesn’t allow sightseers, but they tell him he asked them to help him inside. The teenagers try to open the doors to leave, but they can’t get out. The Doctor tells them they’re travelling through the Vortex and warns them that if he opened the door now, every one of their molecules would disintegrate into nothingness. He checks the instruments and says he thinks they’re heading back to Karn. He realises there must be something very important about the crystal if someone was prepared to kill him for it and the Time Lords obviously want him to investigate too. He places the crystal inside a locker just as the TARDIS starts to materialise. He tells them they’ve landed and Jimmy insists that he lets them out.
Outside, the Doctor, Jimmy and Jenny finds themselves on an alien world. They’re in the middle of a desert with weird-shaped rocks and dead looking trees, and there are ruined buildings in the distance. The planet is dark, apart from the light coming from a strange moon above them. The Doctor tells them they’re just outside the Citadel of Karn, once the centre of the mightiest empire the galaxy has ever known, but now it’s just a shattered ruin. The Masters of Karn were brilliant scientists who invented wonderful machines and terrible weapons. They ruled hundreds of planets, but at the peak of their power they quarrelled amongst themselves and a terrible civil war broke out. When it was over, their empire was destroyed and their home planet was devastated, leaving only a few struggling colonies behind.
They hear a strange noise in the darkness and the Doctor says it must be one of the native lifeforms. They‘re the results of atomic radiation caused by the catastrophe and most of them are pretty nasty. The Doctor decides to look for more of the crystals and shows them a small black box which he calls a crystal detector. He adjusts it to resonate on the frequency of the one he found earlier and it immediately starts giving off a reading. He heads off, but Jimmy and Jenny don’t want to go with him so they decide to wait outside the TARDIS. Once they’re alone, Jenny rebukes Jimmy for being so unpleasant to the Doctor, but Jimmy thinks the man is mad and blames him for kidnapping them. Jenny hears a scuffling noise nearby and gets really scared, so Jimmy arms himself with a nearby branch and goes to look around. He disappears into the shadows and then Jenny hears a loud noise and calls out to him.
Suddenly a group of people emerge from cover and grab Jenny, dragging her back to where they’d captured Jimmy seconds earlier. One of them lights a lantern and the teenagers see they’re surrounded by guerrillas, all wearing cloaks and all armed to the teeth. A man named Garm demands to know who they are and what they’re doing on Karn and when Jenny tells him they were brought here against their wishes, he assumes they must be slaves, like he once was. Jimmy tells them about the Doctor, and says he came here looking for some crystals. The group also have their own crystal and are now convinced the Doctor must be an agent working for their enemy. Garm proposes killing the two captives and setting an ambush for the Doctor, but another man, Jedak, overrules the suggestion and says they may be fighters, but they’re not murderers. A woman named Tara points out that they don’t know the Doctor is an enemy for certain, so Jedak says they must find out what the new arrivals are doing on Karn first.
Just then, the Doctor returns with another crystal, exactly like the one in Jedak’s hand, and says he found it hidden in the nearby ruins. Jedak reveals that it’s part of the Crystal of All-Power and orders him at gunpoint to hand it over. Before the Doctor can do so, they heard the sound of approaching creatures and Tara says they must have picked up their scent again. Garm pleads with Jedak to kill the travellers and take the crystal, but Jedak says it doesn’t matter who actually has the crystals so long as their enemy doesn’t. He advises the Doctor to leave Karn while he can, then the group disappears back into the shadows, leaving the Doctor, Jenny and Jimmy alone.
The Doctor tells his new friends that they’ve learned a lot from their encounter. They now know the crystals are important and that at least two different groups are prepared to kill to get them. He thinks Jedak’s group must be escaped slaves, but the question is - who were their masters? They hide behind some rocks as the approaching creatures get nearer and reveal themselves to be huge Clawrantulars, half-man, half-crab. The Doctor says they must be some of the mutants he mentioned earlier. They’re clearly intelligent and are wearing military harnesses and carrying weapons. The creatures begin to search the area, but eventually they move away and the Doctor’s group emerge from their hiding place. Jimmy insists on going home, but the Doctor says he plans to follow the Clawrantulars as he wants to find out how many more of the crystals there are and why they‘re so important. It occurs to him that the whole of the crystal might be greater than the sum of its parts. He realises the creatures are probably searching for the guerrillas, so he decides to head for the City and warn them. He advises his companions to join him as it won’t be safe to stay outside.
The Doctor and the others arrive at a metal wall that surrounds the City. They search for an entrance, but it looks like there’s no way in. The Doctor assures them it’s only logical for there to be a gate somewhere, but Jenny wonders if the inhabitants never went outside. The Doctor notices the City itself is virtually a ruin, but the wall is in perfect condition - as if the City is alive and protecting itself against intruders. They hear the sound of a battle taking place nearby and the Doctor identifies the weapons as neutron blasters. They race off towards the sound and see the guerrillas who captured them earlier fleeing from an ambush. The big man, Garm, has been wounded. The Doctor, Jimmy and Jenny join them and Jedak demands to know why they’re following them. The Doctor says he came here to warn them (and he admits that he came to get more crystals too) and assures them they’re not their enemies. Tara tells him there are only seven crystals in existence and between the two groups they already possess three of them. Garm accuses the Doctor of working for “them”, but Jedak and Tara realise they need all the help they can get. Jedak is about to reveal all when the Clawrantulars catch up with them and the group is forced to take cover again. Jedak and Tara decide to lure the creatures away and they race off, leaving the Doctor, Jimmy, Jenny and Garm in a secure hiding place.
Some of the Clawrantulars chase off after Jedak and Tara, but one of them stays behind to finish off Garm. The Doctor steps out from cover to protect the injured man and kicks its weapon right out of its hand. The huge creature is too strong for the Doctor and it grabs hold of him, so Jimmy reaches for the dropped weapon and eventually manages to shoot the beast. Garm is in a bad way, but he weakly manages to tell the Doctor he was wrong about him and he now realises they’re friends after all. He tells them to use the maintenance tunnels to get to the Computer in the City as it knows everything, but he warns them the route is protected by dangerous monsters. He passes them a map and the third crystal, then just before he dies he tells the Doctor he has to stop the Doomsday Plan. The Doctor tells his friends it’s up to them to make sure Garm’s death isn’t wasted.
As they make their way through the maintenance tunnels, Jimmy begins to argue with the Doctor about the accuracy of the map and the route to the Computer. The Doctor says he has an uneasy feeling and thinks rushing blindly ahead will result in them facing untold dangers. Jimmy gets increasingly angry and they both start to try each other’s patience. Then Jimmy announces that he’s going off down one of the tunnels alone and they begin to fight over ownership of the guerrillas’ blaster. Eventually Jenny snaps at both of them and tells them to pull themselves together. Then, to her horror, she trips on a skull on the floor of the cave mouth. They find a huge pile of bones, some evidently from humanoids and others from animal, which are evidently all that remains of the creatures who’ve tried to go down that tunnel in the past. The Doctor realises they must have been killed by something powerful as some of the skulls are from animals who could obviously look after themselves. He suggests they discover what form the danger takes before they proceed any further.
Suddenly they find themselves trapped between two huge Clawrantulars and realise they’re being herded down into the tunnel. Jimmy uses the blaster to kill one of the creatures, but then he discovers the weapon is empty. The remaining Clawrantular charges towards them, but the Doctor manages to use his expertise in Venusian Aikido to hurl the creature directly into the cave mouth. It lights up like a Christmas tree and then falls down dead, caught in the grip of a very powerful electronic force field. This must be what killed all the other creatures too. Jimmy realises that if the Doctor hadn’t stopped him racing off, it would have been him who was killed. It seems their luck is in as the Doctor finds another crystal in the Clawrantular’s pouch, which means they now have four of the seven. The Doctor fits together the three in their possession and it makes one larger crystal. He believes that when all seven crystals are combined, it will form the Crystal of All-Power Jedak mentioned earlier.
The Doctor is confident the force field was designed only to work against living creatures, which means it’s probably activated by bodily heat. He finds a power source hidden in the wall of the tunnel and uses his sonic screwdriver to dismantle it. Slowly, he steps inside the tunnel and is relieved to see that the force field is no longer active. Just then, a deep booming voice congratulates him for being the first living creature in a thousand years to cross the barrier. The voice identifies itself as belonging to the Computer and explains that the City is in its charge. It tells the Doctor to move closer as it needs to know why he’s come here. Lights appear in the tunnel, showing them the way forward. Slowly, the three of them advance…
They find themselves facing an enormous Computer and even the Doctor has to admit that he’s impressed. The Computer says it’s been many years since a lifeform as intelligent as him has come to the City. It explains that it was built by the Masters of Karn and, as it’s powered by the Sun itself, it will function forever, guarding the City and destroying any intruders. It asks the Doctor why he’s here and he says he’s come in search of knowledge. The Computer says all its memory circuits contain everything that was known to the Masters and invites the Doctor to ask any question. The Doctor asks about the Crystal of All-Power - in particular, he wants to know what was its purpose, why was it created and why was it divided into smaller segments which were then hidden? He says he believes hostile forces are seeking to reassemble the Crystal and he wants to prevent it being used for evil. A shelf emerges from the Computer to reveal a jewel case, containing another of the smaller crystals.
The Computer reveals that knowledge of the Crystal of All-Power is forbidden and that anyone who seeks it must be destroyed. A huge concrete block above the Doctor, Jimmy and Jenny begins to descend and they realise the Computer plans to kill them too! Light beams appear around the cavern and the Doctor warns his companions not to touch them, reminding them of the force field in the tunnel. The Doctor argues that a lot has changed on Karn since the time of the Masters and he accuses the Computer of unthinking obedience to out-of-date orders. He says that for an intelligent being, its behaviour is illogical, but the Computer insists that it’s only capable of acting logically. It also reveals that the last Grand Master of Karn is still alive in the Great Hall and if he’d wished to change the Computer’s programming, he could have done so already. The Doctor asks for a chance to prove that his own intelligence is much greater than that of the Computer. He asks it one simple question - if everything he says is true, but he says that he’s a liar, what does the Computer make of that? The huge machine tries to work its way through the conundrum, but finds that it’s impossible to reconcile the different statements. While it’s distracted with the puzzle, the force field starts to flash on and off, so the Doctor grabs the fifth crystal from the jewel case and urges Jenny and Jimmy to follow him back into the tunnel.
It’s not long before the Doctor and his companions find themselves lost in the catacombs beneath the City. Jimmy thinks this is worse even than the maintenance tunnels as the dark, dank setting reminds him of something out of a horror movie. He mocks Jenny when she says she feels sorry for the Computer, but the Doctor tells her he knows how she feels. They consult the map and head for the Great Hall where the last Grand Master is supposed to live. The Doctor’s plan is to persuade him to reveal where the last two crystals are and tell him what the Crystal of All-Power was used for. He says the Masters of Karn were never really evil, just proud, arrogant and over-confident in their own powers. He believes that although the Crystal has great potential for good, it was deliberately split up to prevent it being used for evil purposes. He intends to hand it over to the Time Lords for safe keeping. They hear a noise coming from one of the side tunnels and the Doctor reminds them about the other lifeforms inhabiting this planet. He tells them that after the war, a lot of the sea creatures mutated and came to live on the land, including a particularly nasty species of giant land crab.
Suddenly one of the crabs emerges from the darkness and grabs hold of the Doctor. It starts dragging him back into the tunnel, but Jimmy and Jenny grab hold of him and begin a desperate game of tug-of-war. The Doctor realises it’s no good and urges his friends to let go before they get dragged in too. Just then, Jedak and Tara appear and tell the youngsters to stand clear. They open fire and seconds later the giant crab releases the Doctor and retreats back into the shadows. The Doctor’s ribs are a bit sore, but otherwise he’s unhurt. He thanks the guerrillas and guesses they must be on their way to the Great Hall as well. Jedak wonders if the Doctor’s been spying on them, but then he admits that he’s been fighting so long it’s hard for him to trust anyone.
Tara tells them the age of the Masters has passed into legend. After their empire collapsed, the people were happy to go back to a simpler way of life, abandoning science and staying away from the cities. Most of the land was unspoiled so they became farmers - but then their enemy arrived in spaceships and took over the planet. The people were rounded up into slave camps and anyone who opposed them was killed instantly. A resistance organisation was set up and Tara’s brother Marco infiltrated the enemy, gaining their trust and learning their secrets. The enemy was looting the ruined cities in search of the Crystal of All-Power to aid in their great scheme to become rulers of the galaxy. They found two of the small crystals, but then Marco’s betrayal was discovered and he was killed. Jedak’s group were able to steal the crystals and they set about looking for the others. The Doctor reveals that Garm passed him his crystal for safe keeping and Jedak agrees to hand over the other one. They now have six of the seven crystals, so there’s just one more to go. Jimmy assumes the enemy they’re talking about are the Clawrantulars, but Tara says they’re only servants, used like guard dogs to hunt the resistance down, and their enemy is far more terrifying. The Doctor is beginning to think he knows who they are…
Just then, they hear the voices of the Daleks in a tunnel nearby, receiving instructions to begin searching for their prey. The Doctor urges everyone into the side tunnel and although Jenny reminds them that’s where the giant land crab went, he tells her it’s nothing compared to the danger coming towards them. They take cover and listen as the Daleks reveal that one of their agents has told them the escaped slaves are hiding somewhere in these tunnels. The Daleks also know that the slaves are being helped by their deadliest enemy, the Doctor! The Daleks are ordered to track them down and exterminate them. The search party disappears down the tunnel and the Doctor’s group emerges from cover. He tells them the Daleks are the most evil and ruthless lifeform in the entire cosmos and they’re old enemies of his. He consults the map again and realises there are two routes to the Great Hall, so he suggests they split up to double their chances of getting through. Jedak agrees and says he and Tara will meet them at the Great Hall later.
Once they’re alone, Jimmy accuses the Doctor of getting rid of the others so he can hog all the glory himself and be the hero, but the Doctor points out that Jimmy’s done nothing but whine ever since their expedition began. They begin to argue again, but as their voices echo down the tunnels, they attract the attention of the nearby Daleks who burst back into the cave and order them to surrender. The Doctor urges his friends to run, but in the confusion Jimmy loses his footing and is captured. The Daleks demand to know where the Doctor has gone, but he refuses to tell them. Knowing he’s an accomplice of the Doctor, the Daleks are about to exterminate him when the giant land crab suddenly emerges from the shadows again and attacks the metal invaders. The cave is filled with blaster fire and Jimmy uses the opportunity to escape from his captors and race off in the direction of the Doctor and Jenny.
The Doctor and Jenny arrive in the Great Hall of the Masters. The room is impressive, although Jenny complains that it’s too dark to see everything and what she can see appears to be in ruins. There’s a large throne at the far end, and in the roof there’s a hole through which they can see the sky and the moon. Jenny suddenly realises Jimmy is no longer with them and she begins to panic. She insists on going back to look for him, but the Doctor wants to find the last crystal first. They begin to argue, but although the Doctor promises they won’t leave Jimmy behind, he says the Daleks plan to use the Crystal of All-Power for some evil purpose and the success of their mission is far more important than the life of any one of them. Jenny is reluctant to explore in the shadows, so she remains near the entrance while the Doctor goes further inside to search for the crystal.
Jenny becomes increasingly nervous as strange noises echo around her. Then a face appears in the opposite wall and it snarls at her, but before she can react Jimmy enters the Hall, accompanied by Jedak and Tara. The two guerrillas agree to join the Doctor and help in his search, but Jenny asks Jimmy to stay with her. She tells him about the face in the wall, but there’s nothing there now and Jimmy assumes it was just a trick of the light. As they start to argue over whether she imagined it, the face reappears and Jimmy is finally convinced. More faces appear - horrible, glaring faces all around them. A giant skeletal figure appears on the throne at the end of the Hall and a deep voice warns them that the punishment for profaning the Great Hall of the Grand Masters is death.
The Doctor returns and admonishes the Master for frightening children with trickery. The skeletal figure demands to know why he’s come here but the Doctor asks him to hand over the seventh part of the Crystal of All-Power. The Master asks him what he plans to do with it once it’s complete and he tells him he plans to hand it over to the Time Lords. The Master accuses him of lying and believes he wants to use it to power the Ultimate Weapon. Long ago, the Crystal brought the Masters of Karn to destruction, which is why he broke it down and hid the parts so it could never be used again. The Doctor explains that the Daleks have invaded the planet and plan to use the weapon to enslave the galaxy, but the Master appears unconvinced. He reveals that he has the seventh crystal in his hand and he challenges the Doctor to take it if he can. The Doctor tries to step forward, but finds himself completely paralysed, frozen by the power of the Master‘s will. The Doctor forces himself to fight against the Master and it soon becomes a battle of wills to see which of them has the stronger mind. Eventually the Doctor prevails and he snatches the small crystal from the bony hand of the Grand Master.
The Master disappears from the throne and the Doctor tells his friends he must have been a bad loser and the shock of defeat destroyed him. The Doctor connects the last crystal to the others and announces that their mission has been a success. Jedak and Tara return and are overjoyed that they now have all seven components. Suddenly a Dalek bursts into the Hall, accompanied by Clawrantular guards. The group are surrounded and the Dalek orders the Doctor to hand over the crystal, or else it will exterminate his companions, one by one. The Doctor hesitates, so the Daleks says it will begin with the youngest female - Jenny. The Doctor reacts instantly and throws the crystal into the shadows, where it disappears from sight. The Dalek turns its attention to the Clawrantulars and orders them to spread out and find the crystal, which gives the Doctor and the others the opportunity to escape.