The Doctor, following the events of The Armageddon Factor, has installed a "Randomiser" onto the TARDIS to elude the Black Guardian, and is repairing K-9. Meanwhile, Romana regenerates into the form of Princess Astra from the preceding adventure, in spite of the Doctor's disapproval.
The TARDIS lands on a rocky planet which has breathable air but dangerously high levels of radioactivity. The Doctor gives Romana tablets to combat the radiation and a beeper-like device to inform her when she must take her pills. They exit the TARDIS and see a group of ragged-looking natives burying one of their dead. They see a spaceship land and half-bury itself into the ground in a valley. Just as the Doctor and Romana are about to investigate, underground explosions force them back towards the ruins. Whilst exploring the ruins, another underground explosion occurs, causing a column to fall on the Doctor. Romana returns to the TARDIS to reassemble K-9 and get him to assist in removing the debris. She finds the TARDIS half-buried in rubble and, realising that she cannot reach K-9, she turns back.
Meanwhile, the Doctor is quite happily reading the book "Origins of the Universe" by Oolon Colluphid, remarking that he needs to remind Romana to take her anti-radiation pills. A group of silver-haired humanoids appear and point their weapons at him.
Romana returns to the ruin, to find that the Doctor has vanished. As she turns to leave, a man who has been following her blocking her path. She backs away, only to fall down a rubble chute, and loses consciousness. The man then prepares to climb down and help her, but before he can do so she recovers consciousness and hears a noise that resembles drilling coming from one of the walls. A pair of Daleks burst through the wall and capture her.
The Daleks threaten to exterminate Romana if she does not comply with their instructions explicitly, and then command Romana to come with them. The man secretly follows
Meanwhile, the Doctor is thanking the Movellans (the silver-haired humanoids) for helping him, and he remarks on their strength. He asks their commander, Sharrel, where he is, and Sharrel replies that the planet is D-5-Gamma-Z-Alpha, otherwise known as Skaro. The Doctor is astonished to hear that the Movellans are here to wage war against the Daleks.
Romana, meanwhile, is being interrogated by the Daleks. After they learn that she is of no threat to them, the Daleks command Romana to work at one of their drilling sites.
Back at the Movellan ship, two Movellans enter with a new prisoner, the man who has been following the Doctor and Romana. He identifies himself as Starship Engineer Tyssan, who was captured by the Daleks two years ago. He collapses after revealing that the Daleks have used him as slave labour as part of a search operation. He soon comes around, and says he does not know what the Daleks are looking for. He tells the Doctor about what has happened to Romana, and they set out to rescue her.
Romana meets with some other workers, with whom she discusses the Daleks' hatred for humanoids, and learns that she is getting weaker as a result of radiation sickness. Within minutes she collapses, apparently dead. Her fellow workers remove her body.
The Doctor, Tyssan and the Movellans Sharrel, Lan, and Agella find Romana's grave. As the Doctor tries to dig her out, she appears behind him and explains that she feigned death to escape. They head into the Dalek headquarters. Lan is left on guard outside of the Control Center and is shot by a Dalek who is out searching for them. The Doctor establishes that the Daleks are searching for something on a level that they have yet to access. He remembers an alternative route to this area, so he, Romana, and Agella make their way to this floor while Sharrel returns to his ship. There they discover Davros, the creator of the Daleks, in suspended animation. Part of the ceiling collapses onto Agella and while the party is distracted by this, Davros slowly comes to life.
The Doctor moves the revived Davros into a blocked-off room in the old Kaled city. Romana and Tyssan escape out of the window, and return to the Movellan ship. The Doctor and Davros talk about the Daleks' "accomplishments": whilst the Doctor comments on the countless lives the Daleks have ruined, Davros replies that the Daleks have only just begun their conquest of the cosmos. The Daleks find them both, and proceed to exterminate some prisoners until the Doctor complies. The Doctor then threatens to kill Davros with a makeshift explosive he has just concocted. He then orders the Daleks to free all their prisoners, and to let him escape. The Daleks say that these conditions are unacceptable and illogical and that the exterminations will continue. Davros makes them see that the Doctor's logic is "impaired by irrational sentiment". The Daleks comply, and the Doctor attaches the explosive to Davros' chair, telling him it will detonate when he uses his sonic screwdriver. He then escapes. Davros orders the Daleks to remove the explosive, though the Doctor detonates the device the resulting explosion destroys a Dalek. Davros vows to make the Daleks invincible, and the supreme power of the universe. Agella is revealed to be unharmed, and she returns to report all she has just heard to her fellow Movellans.
Romana reaches the Movellan spaceship; but learns that the Movellans are not as altruistic as they appear. Agella uses her weapon on her, which knocks her out. The Movellans test their nova device: a weapon which changes air molecules so that a planet's atmosphere becomes flammable and can be set alight, killing all lifeforms.
The Doctor meets up with Tyssan and they find a Movellan scout. The Doctor deactivates her by removing the power pack/controlling circuit on her belt and reveals that the Movellans are, in fact, robots. He finds the unconscious Romana attached to the nova device, sealed inside an airtight container. He sends Tyssan away and tries to open the container, as the timer ticks down.
Just as the timer approaches zero, the Doctor is knocked out by one of the Movellans' weapons. However, Romana is not in danger, as the nova device is revealed to be a harmless decoy used to lure the Doctor.
The Doctor learns that the Daleks and Movellans have been in a stalemate for over two centuries, and that both sides' battle computers have been calculating the best strategy and precise moment at which to attack. So far, not a single shot has been fired. The Daleks want Davros to help them gain an advantage. The Movellans want the Doctor to do the same for them, which the Doctor refuses to do. Davros, on the other hand, is all too eager to give the Daleks the upper hand. He orders them to make a suicide bombing attack on the Movellan craft upon realising that the Doctor might do the same thing for the Movellans. Meanwhile, Tyssan leads the prisoners in an attack on the Movellans, ending with them all being deactivated.
While the prisoners take control of the Movellan ship, the Doctor makes his way to the city to confront Davros. The Doctor informs Davros that the Movellans have been disabled; unfortunately Davros does not believe him and intends to destroy the Movellan ship anyway. As the Daleks approach the ship, the Doctor goes to detonate the bombs prematurely, only to discover too late that Davros didn't send all the Daleks on the suicide run when one ambushes him and holds him at gunpoint.
The slaves are no match for the Daleks, who begin exterminating them. The Doctor throws his hat on the Dalek's eye-stalk, blinding it. As the Dalek fires around blindly, the Doctor attaches an explosive to it and blows it up, then activates the bomb detonator and destroys the attacking Dalek squad. He then puts Davros into the custody of the former slave workers. Davros will be placed in cryogenic suspension and taken to Earth to stand trial for his crimes. The Doctor and Romana leave; remarking on the fact that whoever makes mistakes often wins.