In deep space, the Institute for Advanced Scientific Studies is quarantined, and a recorded message warns ships away. Professor Caldera contacts Skagra, who tells him to come to the main lab, where Caldera finds his colleagues motionless and their minds trapped in a white sphere. Skagra adds Caldera’s mind to the sphere. Meanwhile, in Cambridge, Chris Parsons arrives at St Cedd’s College to borrow books from Professor Chronotis, who is forgetful but hospitable. Chris collects random books and leaves, puzzled by an old police box in the room. The Doctor and Romana arrive at Chronotis’s, who offers them tea and mentions a dangerous book from Gallifrey, The Worshipful and Ancient Law of Gallifrey, which he wants returned. As they search for it, Skagra, using a mind-controlling sphere, commandeers a car and heads to his Ship, where he reviews the Doctor’s history and contacts the Krarg Commander, planning to seize the book and conquer the Universe.
In Chronotis’s study, books pile up, but The Worshipful and Ancient Law of Gallifrey remains missing. Romana reminds the Doctor of its power, though he downplays its importance. They ask Chronotis about it, who recalls a student borrowing books earlier. Meanwhile, Chris and Clare discover the book has no molecular structure and absorbs radiation. Chronotis remembers the student, Chris Parsons, and directs the Doctor to his lab. Skagra, dressed in stolen clothes, arrives at Chronotis’s and demands the book, using a sphere to attack Chronotis. The Doctor meets Clare, finds the book, and learns it’s 20,000 years old. Skagra returns to his Ship, reviewing Chronotis’s memories and seeking the Doctor. Romana tries to save Chronotis, but he dies after warning about Skagra and Shada. The Doctor is chased by Skagra’s sphere, which ultimately attacks him, allowing Skagra to seize the book.
The TARDIS materializes, rescuing the Doctor as Skagra drives off with the sphere. Romana helps the Doctor, but he's furious to learn Chronotis is dead. In his study, Chronotis’s body vanishes as the Doctor and Chris discuss losing both the book and the Professor. Romana and Chris recall Chronotis’s warnings about Skagra and Shada. Clare, attempting to warn Chris about the book, decides to visit Chronotis herself. The Doctor’s group traces the sphere to a field and encounters Skagra’s invisible ship. Inside, Skagra forces the Doctor to read the book, using the sphere to extract his mind. Romana, Chris, and K9 are trapped, but K9 detects the Doctor’s voice among the sphere’s signals. Skagra captures Romana and uses the Doctor’s key to access the TARDIS, leaving the Doctor, who pretends to be dead, to manipulate Skagra’s Ship into releasing his companions before it shuts off his air supply, causing him to suffocate.
Chris and K9 find themselves in a spaceship corridor and manage to restore the Doctor's oxygen, enabling him to continue manipulating the ship by pretending to be dead. They realize Romana is missing and the TARDIS is gone, taken by Skagra, who needs Time Lord technology to find hidden knowledge. Skagra intimidates Romana with his Krarg army and discusses his plan involving Salyavin and the book's code, which he deciphers by manipulating time. Clare accidentally activates Chronotis’s old TARDIS, causing him to reappear and explain their urgent need to stop Skagra from accessing Shada, the Time Lords' prison planet. Meanwhile, the Doctor and Chris travel to the Think Tank, encountering scientists whose minds were drained by Skagra, learning he seeks Salyavin's unique mind for his plans. As they face a Krarg attack, the urgency to thwart Skagra's scheme intensifies.
The Krarg absorbs energy from K9's blaster, forcing the Doctor and Chris to flee the exploding Think Tank with K9 and the Ship. Regretting the loss of the scientists' minds, the Doctor directs the Ship to Skagra's carrier, convincing it to follow his orders. Meanwhile, Chronotis struggles to repair his old TARDIS with Clare's help by enhancing her knowledge temporarily. Skagra prepares to merge the universe's minds using the sphere and Salyavin's powers. The Doctor, Chris, and K9 escape from Krarg guards and reunite with Chronotis in his study, realizing they must stop Skagra. On Shada, Skagra discovers Chronotis is Salyavin and captures his mind with the sphere, aiming to create a universal mind with his Krarg army.
Chris and Clare race to the scene, but Chris is possessed by Skagra’s sphere. Romana creates a barrier with K9's blaster, allowing the Doctor and friends to escape, leaving Chris and Chronotis behind. Skagra, planning a mind revolution, takes over the Doctor's TARDIS. The Doctor, Romana, and Clare use Chronotis’s TARDIS to counter Skagra's control. Amid a mental battle, the Doctor, wearing a modified helmet, takes control of the mind-controlled army, saving Chris. Skagra is captured by his Ship, now loyal to the Doctor. The Doctor finds Chronotis in a coma on Shada and decides to leave his fate to the Time Lords. Back at St. Cedd's College, the Doctor and Romana return Chronotis’s room and leave in the TARDIS, promising to keep his secret.