In the TARDIS, the Fourth Doctor and Adric have arrived back in N-Space near the star Metulla Orionsis, home to the Traken Union, famous for its universal harmony. The Doctor describes it as an "Empire held together by people being terribly nice to each other." When Adric tells the Doctor that the TARDIS is headed for Traken, the Doctor is surprised and accuses him of setting the coordinates himself, which he denies. They find themselves in orbit around Traken, when suddenly the figure of an elderly man on a throne appears within the console room. The Doctor correctly identifies him as the Keeper of Traken — one of the few beings in the universe capable of taking control of the TARDIS. The Keeper reveals that he will soon die and have to pass on his powers to a successor, and asks the Doctor to come to Traken, but warns him of great danger.
On the scanner, the Keeper reveals images of Traken, its Fosters — guardians of the spiritual welfare of their capital, and of the arrival of an evil creature known as a Melkur. The creature's baleful influence cannot go beyond the groves and becomes calcified. A young Trakenite woman called Kassia is seen pitying it, bringing it flowers and talking to the statue. The Keeper reveals that the images were from years ago, and that Kassia is now a Consul. He shows images of the day of her marriage to fellow consul Tremas, saying that that day was a turning point for Traken.
Tremas is giving a speech, standing next to him his daughter Nyssa. The party goers gossip about Kassia's attendance at the Melkur statue, saying that people thought she would marry that instead. Tremas and Kassia enter the Keeper's chamber to receive his blessing. The Keeper wonders aloud about the protracted demise of the Melkur, and releases Kassia from the task of tending to it. He says that from then on, Nyssa will look over the Melkur. In the TARDIS console room, the Keeper says that Tremas is his named successor, but that he sensed all pervading evil affecting Tremas, Kassia and Nyssa, and with that disappears.
In the grove, Kassia is tending to Melkur for what is supposed to be the last time. She pours out her heart to the inanimate statue about her concerns, that once Tremas becomes Keeper, he will be taken from her. A voice is heard emanating from Melkur echoing her word "soon". A short time later, Fosters find a body outside the Grove and the Consuls are summoned to a meeting by Kassia. Tremas scans the area, but the readings are off the scale of his instrument. He says that it means some force is taking control of Traken. At the meeting Consul Katura asks if the man has been murdered, and Tremas states that he came into contact with a high energy field. Unheard, Kassia whispers that it is a sign of the power of Melkur. Aloud she says that the great danger necessitates that the Fosters be armed, but the Consuls cannot agree between themselves, and summon Proctor Neman.
The Doctor and Adric look through a Time Log to see if the Doctor has visited Traken before, but discover nothing useful before they arrive. They emerge in the Grove, opposite to the Melkur statue. Adric comments that it looks almost alive. As they exit the Grove, they are surrounded by armed Fosters. The consuls vote to summon the Keeper, just as the Doctor and Adric are brought before them. They reveal to the consuls that they had been invited to Traken by the Keeper. Neman and the other Fosters are sent to check the presence of the Doctor's craft in the grove, but before they arrive, red light is seen shooting from the Melkur's eyes towards the TARDIS, causing it to disappear. Neman returns and says that the Grove is empty. As the Keeper is summoned, Melkur is seen striding from the Grove towards the Court room. The Consuls ask about the identity of the Doctor and Adric, and Melkur stands at the doors of the room seen only by the Keeper, its eyes glowing red. The Doctor asks the Keeper to identify them, but he cries out "evil! the sanctum is invaded! … evil, infinite evil!"
Surrounded by the armed Fosters, the Doctor, arguing for his life, says it was obvious that the Keeper had been attacked. Kassia describes the Doctor and Adric as creatures of evil before becoming overwhelmed and faints. Seeing Tremas's instrument, he says that he could use it to detect the high energy beam used to attack the Keeper. Meanwhile, Melkur is seen attacking Fosters with lasers shooting from its eyes. Examining Tremas's readings, the Doctor says that such plasma fields could not be generated without formidable magnetic containment. Tremas speaks up for the Doctor and Adric to the other Consuls saying no charges have been proved. He invokes Consular privilege to protect them, and Kassia is particularly displeased. Consul Seron says that should they breach any law, Tremas's life will also be forfeit.
Meanwhile Kassia rushes to Melkur. Seeing the Fosters' bodies, she says that this must not be discovered, it is too soon and starts hiding the bodies. The Consuls emerge from the Court room, and hand the Doctor over to Tremas. The Doctor notices that some of the stones in the courtyard have been hit with a plasma beam.
The following day, Nyssa attends the grove to bring flowers to the Melkur statue. As she brushes moss off the statue, Kassia is seen lurking in the bushes. Nyssa leaves and Kassia runs over to the statue and speaks to it. Melkur says to her that when the Keeper dies, he would be the last of his kind on Traken. A short time later, Kassia tells Katura and Consul Luvic that Tremas has secretly been recording the nature of the energy emissions. When Seron enters the room, he scolds them for holding secret meetings, and reveals that Tremas had told him about the recordings, but Kassia says that it holds grave repercussions about the succession to Keeper. The Consuls suggest that Tremas should enter rapport with the Keeper to discover the truth, Seron says that Tremas only did what he did under his suggestion. When Luvic suggests that instead Seron should enter the rapport, Kassia hisses that was not what was intended. Kassia offers to hold vigil over Seron's rapport with the Keeper.
After breakfast, Tremas and the Doctor go to the Grove to search for the TARDIS. Outside the Grove is a crowd of people. Neman says that they are ordinary people who are waiting for a sign from Melkur who they believe to have been redeemed. He says that would not be wise to enter the Grove at that time, but Tremas knows of a secret entrance to the Grove that they can use instead. Meanwhile, Adric and Nyssa are conducting a Fourier analysis of the energy readings. Adric thinks he recognises the energy readings, but wants to check them with the Doctor. In the Grove, Kassia is seen again conversing with Melkur. He gives her a band and asks her to wear it as a token of her allegiance, and she places it around her neck. When the band glows red, Melkur commands her to go forth and be its eyes and ears. Kassia informs it that Seron will enter the rapport instead of Tremas, but Melkur does not seem concerned. The view from within Melkur is seen, that of Kassia shown on two screens with various computer and instrument panels beneath. When Kassia begs it to spare her husband's life, an emaciated hand is seen switching off the two screens, accompanied by a throaty chuckle.
Tremas and the Doctor enter the Court room, and they see a light indicating someone is inside the source chamber. They duck out of sight and Kassia is seen emerging. Tremas goes to speak to her, but the Doctor pulls him back noticing that she appears to be in some sort of trance. When she has gone, they descend into the source chamber, where they see the source manipulator. The Doctor admires it and calls it beautiful. Entering the Grove from the secret entrance, they are observed by the creature within Melkur. The Doctor realises that the TARDIS is in fact present in the Grove, but has been displaced in time. As the Doctor and Tremas go back to retrieve some equipment, the Melkur creature is heard saying "find your TARDIS Time Lord, much good will it do you now…"
Nyssa, seeing the crowd outside the Grove, asks Neman to disperse them but he complains that he cannot legally do so. Nyssa replies that it is the Consuls who determine what is lawful and insists that the Fosters clear the people away, and gives him a purse of money to ensure his compliance. When all is clear, Nyssa and Adric to attempt to enter the Grove, but find its gates locked. Adric picks the lock and slips through the gates. Before Nyssa can enter too, Consuls Katura and Luvic see her and warn her against entering, before leading her away leaving Adric alone in the grove. He is observed by Melkur, and receives a scare when he grabbed from behind, but it is only the Doctor. Retreating to the source chamber, Adric reveals that the energy readings might be from a TARDIS and the Doctor agrees. The Source manipulator activates, and Tremas says the Keeper is being summoned — it is Seron's rapport.
Watched by Kassia, Seron is enveloped in a column of light. The Keeper appears and says that Seron is blameless but doomed. Looking directly at Kassia, he says that they are both betrayed. When the Keeper disappears, Kassia's band and eyes glow bright red, and she shoots laser beams killing Seron. At that moment, Tremas arrives and seeing Seron's body asks Kassia what she has done, but as the other Consuls arrive she declares that Seron was dead because he was rejected by the Keeper. She orders the Fosters to seize Tremas, the Doctor and Adric, but they flee to the grove. As the Doctor attempts to retrieve the TARDIS, Melkur speaks directly to him. The Doctor shields his eyes from Melkur's gaze. The TARDIS reappears, but before they can approach it, Kassia enters and blocks the way. When Tremas goes her, she stuns him with her glowing red eyes. Distracted momentarily, the Doctor, Adric, and Tremas are caught in a net by the Fosters. Kassia approaches Melkur and states that she has done his will, but Melkur retorts that "it is only just beginning…"
Tremas, Adric and the Doctor are placed in a cell in the penal wing by the Fosters. Kassia instructs Neman to watch them, telling him they are the source of evil. She then tells Katura and Luvic that a new successor to the Keeper must be found. The Doctor attempts to pick the cell lock using his sonic screwdriver. In the grove, Melkur informs Kassia that Tremas will continue live as long she continues to obey it, and that she must become the next Keeper. Tremas informs the Doctor that Melkur could not come in contact with the Source, as the bio electronics only permit access to a Trakenite, but they realise that Kassia will fulfil that role.
Kassia meets with Katura and Luvic to persuade them that she should be the Keeper-nominate, which they readily do. Meanwhile, Nyssa attempts to get past Neman to see her father, but when he will not budge, she threatens him with an ion bonder. Neman tries to rush her and she shoots him and another guard with a green energy beam. She proceeds to the cell and frees the Doctor and the others. When Kassia finds the stunned Neman, she furiously orders him to search the sanctum and the Grove. Pursued by guards, the Doctor is forced to stun two of them with the ion bonder. They go to Tremas's quarters, hoping that they have already been searched. The Doctor asks him if he has the master plans for the source manipulator. Tremas is reluctant to allow the Doctor to see them as he swore an oath to keep them secret, but the Doctor impresses the gravity of the situation and he relents. The Doctor devises a plan to trip one of the critical circuits.
The Keeper is dying, and Kassia is summoned by Katura and Luvic. The Doctor and the others try to get to the TARDIS, but are caught in the Grove by Neman and the Fosters. Neman informs them that the Keeper-nominate has sentenced them to death, but a sudden thunder storm terrifies the Fosters and they flee before carrying out the execution.
Kassia enters the Sanctum at the moment of the Keeper's death. She seats herself on the Keeper's throne. In the grove Melkur taunts the Doctor, telling him to look into its eyes for a swift death. Inside Melkur, a hideously deformed figure is seen, and behind him a black wall with roundels is seen. The Melkur statue dematerialises from the grove with a TARDIS-like sound. As Katura and Luvic prepare to use their Consular rings to connect Kassia to the source, the Doctor bursts into the chamber and pleads with Katura not to complete the transition, but she ignores him. Kassia screams in agony, and disappears and the Melkur statue materialises in her place…
The Melkur statue tells the Consuls that the Doctor is known to it. Melkur commands Neman to confine the Consuls to their quarters. As he does so he begins to fade from the throne before disappearing. In the TARDIS, Adric and Nyssa test the drives in case they need to leave in a hurry, but find that they are being blocked. Adric reveals to Nyssa the Doctor's plan to destroy Melkur, but tells her that do so they would also have to destroy the source. The Doctor and Tremas discuss how they might be able to defeat Melkur before he has complete access to the Source. They do not have the five Consular rings, but with the Source manipulator blue-print, the Doctor thinks there may be a way. Melkur dispatches Neman, now adorned with a control band, to secure the blue print document. He enters Tremas's quarters, and asks for the blue print to be handed over. The Melkur statue materialises within the room, and when Tremas refuses to release the document, Melkur shoots energy beams from his eyes at him. The Doctor releases the document, and Melkur burns it with its energy beam, but then fades away again. The Doctor knocks Neman and the Fosters' heads together, and retrieves Tremas's Consular ring.
Nyssa and Adric complete construction of a servo-shutdown, with which they can sabotage the source manipulator. The Doctor goes to the sanctum, and prepares to try to break the encryption of the Source security system, which is based on a single large prime number. Before he can complete the entry of the number, the Melkur statue arrives. The Doctor tells Tremas to remember the numbers 3-3-7. Nyssa and Adric enter the Source manipulator chamber and prepare to attach the device. Tremas tries to make a defiant stand against Melkur, but Melkur mentally controls him. Neman is brought forth and hands his weapon to Tremas. Under Melkur's willpower, Tremas shoots down Neman. Melkur outlines its plans of conquest, saying that many old scores will be settled. It asks if the Doctor still does not know who it is. The Doctor is drawn within the Keeper's inner sanctum, before both he and the Melkur disappear. Inside Melkur, the Doctor immediately recognises the disfigured creature as the Master. The Doctor is paralysed when the Master keys his TARDIS's systems to his bio rhythms. The Master explains that he is nearing the end of his twelfth regeneration, and that with the powers of the Keeper of Traken he can extend his life beyond this final limitation of a Time Lord. Just as he is about to attack the Doctor to take his body, the servo-shutdown begins to destabilise the Source. The Master screams in agony, many of his TARDIS controls explode and a raging fire starts. The Doctor, able to move once again, smashes through a glass panel to escape.
The Doctor appears within the Sanctum and tells Adric to key in the final digits 3-3-7, and he is released. With the encryption broken, Adric's sabotage of the Source is reversed. Luvic runs to the throne to become the new Keeper before the Source dies. Adric and the Doctor return to the TARDIS. As things settle down on Traken, Tremas investigates a mysterious longcase clock. When he touches the clock face, he is transfixed and calls out to Nyssa. The door of the clock opens, and the Master emerges and merges with Tremas… "a new body at last…". Laughing, the newly-regenerated Master enters the clock, which is in fact his TARDIS. The clock dematerialises. Nyssa arrives, and calls out for her father. But there is no answer...
Doctor Tom Baker (Fourth Doctor)
Companion Matthew Waterhouse (Adric)
Sarah Sutton — Nyssa
Anthony Ainley — Tremas / The Master
Geoffrey Beevers — The Master / Melkur
Denis Carey — The Keeper
Sheila Ruskin — Kassia
John Woodnutt — Seron
Margot Van der Burgh — Katura
Robin Soans — Luvic
Roland Oliver — Neman
Liam Prendergast, Philip Bloomfield, Ralph Morse — Fosters
Writer Johnny Byrne
Director John Black
Script editor Christopher H. Bidmead
Producer John Nathan-Turner
Executive producer(s) Barry Letts
Production code 5T
Series Season 18
Length 4 episodes, 25 minutes each
Originally broadcast January 31–February 21, 1981