The Doctor and Romana visit Earth to visit an old Time Lord, Professor Chronotis, who left Gallifrey and became an academic at St. Cedd's College in London. Being an academic means that Professor Chronotis is often visited by students wanting to borrow someof his books, which is he happy for them to do.
A scientist by the name of Skagra is trying to locate on particular book which Professor Chronotis has in his library: The Worshipful and Ancient Law of Gallifrey. With the aid of a device, which resembles a floating grey sphere, Skagra tries to steal the mind of Professor Chronotis and learn the location of the book.
The book, which had been borrowed by Chris Parsons, is the key to the ancient Time Lord prison planet Shada. Skagra's intention is to find one particular inmate, Salyavin, whose mental powers could be exploited to project Skagra's mind into every living creature in the Universe.
Arriving at Shada, Skagra finds Salyavin's cell empty. The Doctor, Romana, K-9, Chris Parsons and Claire Keightley arrive at Shada in Chronotis's TARDIS. After a battle with the Krargs, servants of Skagra, Chronotis reveals that he is Salyavin. He had escaped from Shada and lived on Earth.
After a battle of wills between the Doctor and Skagra, Skagra is defeated. Everyone returns to Earth where Chronotis continues to live.