The Doctor throws the failsafe, grounding the TARDIS and stabilizing the shield once more.
The Sontarans break into the TARDIS console room, then blast through the inner door. But the Doctor has disabled the failsafe switch and they are forced to follow him into the vast corridors of the time machine.
The Doctor joins Andred and Leela in the workshop. The Doctor hypnotizes Rodan and has her work with K-9 to build a weapon.
The Sontarans try to track the Doctor but a barrier jams their instruments. Kelner leads Stor deeper into the TARDIS to disable the barrier power source. They encounter the Doctor and his companions but the Time Lord evades them, buying time for the weapon to be built. Stor, frustrated, returns to the Capital.
Kelner finally disables the barrier and a Sontaran soldier tracks the Doctor to the workshop where Rodan and K-9 have finished construction of the De-Mat gun, a weapon of fearsome power. They dispose of the Sontaran and the Doctor returns to the Capitol, where Stor is about to detonate a massive bomb. He fires, destroying Stor, the bomb and the gun, leaving him unconcious.
The Doctor returns to the TARDIS, having lost his memory of the entire adventure. The Doctor prepares to leave but Leela decides to stay with Andred and K-9 elects to stay with the Leela. The Doctor takes off alone, but drags out a large box marked "K-9 Mark II".