A vast alien Machine has been discovered in the worked-out mines of an ice world, a human colony ruled by a technocracy. The planet's mineral wealth has been exhausted, and the Scientifica spending the majority of their budget on pure research while the people starve. The Chief Scientist, Whitfield, is more concerned with learning the secrets of the Machine, an artefact of a lost civilisation which she believes holds the secrets of the Universe. Civil unrest continues to spread, and when civilians begin claiming to have seen ghostly apparitions that the Scientifica cannot explain, the Scientifica outlaw such stories on pain of death. A squadron of Adjudicators is brought in to keep the peace, but although Whitfield and Provost-General Medford are lovers, she is unaware that he has a different agenda...
Severe turbulence forces the TARDIS to materialize in the planet's equator-city, and when the Doctor and his companions emerge to investigate, the TARDIS locks them out. While the Doctor and Adric search for the source of the time disturbance, Nyssa and Tegan book rooms at a local hotel, where Tegan sees a loud blond man pretending to be a stereotypical Australian. Furious and convinced that he's up to something, Tegan questions the robot concierge, and upon learning that the blond man has given his name as Bruce Jovanka, she claims to be his wife in order to get his room number. In order to calm Tegan down, Nyssa breaks into Bruce's room to look around, and although Bruce catches her, Nyssa escapes and informs Tegan that he's just an innocent traveller.
The Doctor and Adric pause at a skitrain station to recalibrate the time sensor and become involved in an attempt to hijack a skitrain en route to the Scientifica. The hijackers flee when the Adjudicators arrive on the scene, but the Doctor collapses as another wave of time distortion hits the colony. He and Adric are taken to the Scientifica building for questioning by Medford, and as the Doctor recovers, he begins to question why such a large force of Adjudicators is needed on this planet. Medford, convinced that the Doctor knows more than he's saying, monitors the newcomers as they are shown to their temporary quarters, and takes note that the Doctor's time sensor sounded an alarm when he passed by a secure laboratory. When the Doctor and Adric mention Tegan and Nyssa's names, Medford runs a check on them and finds their hotel registrations -- and that of Tegan's "husband", Bruce. None of the three are registered as having arrived on the planet, and Medford sends a squad of Adjudicators to arrest them all.
As soon as he and Adric appear to be alone, the Doctor breaks into the room behind the sealed door, where he finds an ancient body in a cryostasis tube. But the "Patient" is still alive, and the Doctor experiences a telepathic connection so intense he can't tell whether memories of an unknown Other being are his or the figure's own. As Adjudicators arrive to arrest the Doctor and Adric, the Patient regenerates into a beautiful young woman, and the Doctor realizes that she is a Gallifreyan -- although medical scans indicate that she is not a Time Lord. Her regeneration is failing due to a head injury, but Medford, believing that they are hostile aliens, refuses to let the Doctor help her; as aliens, they have no rights, and can be executed without trial whenever Medford wishes.
Bruce meets Tegan in the hotel bar and tries to chat her up, but she will have none of it, even when he admits that his real name is Christopher Cwej and that he took on the "Australian" disguise on the advice of a friend. He has better luck with Nyssa, who is at least willing to listen to him, but then his partner Roz contacts him; she has broken into Scientifica and has learned that the Adjudicators are after him. Tegan is arrested and taken to the Scientifica for interrogation, but Chris manages to get Nyssa out of the hotel and back to his apartment; he'd only booked the hotel room for a meeting with the resistance leader, Adam.
Bald, humanoid ghosts suddenly appear in the Scientifica and make straight for the secure laboratory, ignoring the Adjudicators' attempts to stop them. In the confusion, the Doctor escapes with the Patient, but Adric stays behind to delay an approaching Adjudicator -- who turns out to be Roz in disguise. The Doctor and the Patient escape through the ventilation system and find Tegan, whose cell turns out to have a loose panel on the back. The Doctor seals it up so nobody will know how she escaped. Shortly afterwards, Roz and Adric arrive; a friend of Roz's had hacked into the computer system to ensure anyone with the name "Jovanka" would end up in a certain cell if arrested, and Roz intends to use that cell to escape. They discover too late that the cell is now sealed, and they are forced to blast their way back out and transmat themselves to a random destination when the energy discharge alerts the Adjudicators to their presence. The ghosts vanish again, and Medford contacts his reinforcements, believing that the invasion he has dreaded for so long is now at hand.
A convenient rope ladder leads the Doctor, Tegan and the Patient -- whom Tegan renames "Patience" -- to the skitrain terminal, where they hide aboard a waiting skitrain, hoping that it will take them to whomever has seemingly masterminded their escape. As they journey north, the Doctor mindlinks with Patience again, and recognizes the name of her husband as a pioneer amongst his people -- which is odd, because his people have forgotten the name. The skitrain stops to deliver supplies at Pryanishnikov Waystation, where the Doctor and Tegan find filled with bodies -- evidence of the Scientifica's brutal suppression of resistance to their rule. Subdued, the Doctor takes something from one of the bodies and returns to the skitrain, but he and Tegan have been spotted. A pursuing Adjudicator 'copter, trying to stop them, triggers an avalanche which buries the train under a hundred metres of snow and ice.
Nyssa learns that Chris and his partners are investigating corruption among the Adjudicators, and when he learns that she is from the dead world Traken he informs her that a colony of her people survived on Serenity. She is delighted by the news, and agrees to help him continue his investigations. Posing as husband and wife, they transmat up to the Skybase, where Chris intends to hack into the hyperlink and find out what the Adjudicators are really doing here. While there, they see a military gunship which isn't listed on the station's manifest, and when they investigate they discover that it contains twenty-eight fusion bombs -- enough to tear apart a galaxy. They steal the ship and are pursued to the planet by Adjudicators, who are unable to fire at them for fear of setting off the ship's cargo. As Chris scans the planet for the Doctor's double-heartbeat, Nyssa removes the fusion charges from the bombs and stores them in a first aid kit.
Patience has been injured in the skitrain crash, and the Doctor mindlinks with her once again, hoping to stabilise her condition; but once again, he can't determine whether the memories he experiences are hers or his own. Chancellory Guards are storming the family House with orders to kill the womb-born, spawn of the Pythia, and her husband is accused of consorting with aliens; but just as the Doctor is about to learn who her husband is, a Shliman names Quint arrives, having burned through the packed ice to reclaim his dead brother's medallion, which the Doctor took from the waystation. The Doctor convinces Quint that he did so to honour Shliman burial customs, and Quint, satisfied, takes the Doctor, Tegan and Patience to the snow-ark from which Adam leads the resistance. Adam is in fact just a petty criminal who has played upon his abiding hatred of the Scientifica to build up his reputation as a resistance leader, but he agrees to take them to a medical facility where Patience can receive treatment.
Roz and Adric arrive in the base where the Machine is being studied, where Adric is surprised to meet Roz's partner, the Seventh Doctor. The Doctor orders Roz to activate the Machine while he and Adric wait in a quiet corner of the cavern, and once the Machine is activated the ghosts appear. The ghosts identify themselves as Ferutu, and the Doctor accompanies them to their Universe to learn more about them. Before he can return, Roz and Adric are captured by Whitfield. Medford, meanwhile, prepares to stage a coup, convinced that the latest appearance of the ghosts heralds an alien invasion which could put the entire Empire at risk.
The Fifth Doctor has come to realize that Patience has come to the planet from the dawn of Gallifreyan history, and that she arrived on the planet in a damaged, prototype TARDIS. Its arrival has torn apart the Vortex around the planet, resulting in the turbulence which has stranded his own TARDIS, and Whitfield's attempts to operate it are causing further damage to space-time and could end up destroying the entire Universe. If Patience can be healed, however, she and the Doctor can mindlink and pilot the Machine back along its original flight path, undoing the damage. Nyssa and Chris land their ship nearby, but are pursued by an Adjudicator in a robot battle-tank. In the the confusion Nyssa loses the kit with the fusion charges, but the Doctor finds them and reverses the polarity of their neutron flow, disarming them, but then finds that Adam has disappeared. Chris, although wounded, shoots out the strip-mined ground beneath the battle-tank, disabling it, and he and Nyssa accompany the Doctor, Tegan and Patience to the Nightingale medical facility.
The Ferutu appear at the remains of Pryanishnikov Waystation, anchoring themselves to the planet with magical runes drawn in the air. Atmospheric disturbances disrupt the transmat system and communications, but Medford detects the radiation signatures of the fusion grenades at Nightingale and brings in a Battle Platform to capture the Doctor and his companions. The Doctor and Patience, who has now fully recovered, give themselves up and try to convince Medford to let them pilot the Machine back to Gallifrey. He agrees, but he has another agenda; Medford is a member of the secret society Unitatus, descended from a United Nations organisation pledged to protect the Earth from alien threats. When the Machine was first discovered Medford recognized the potential threat it posed, and now the Ferutu have arrived. Convinced that the safety of the Empire depends upon his actions, he has called in the Unitatus' secret black ops army, and now, to Whitfield's fury, seizes control of the base where the Machine is being tested.
Tegan, Nyssa and Chris try to hide the fusion charges, but are forced to give themselves up when they discover there is one missing; Adam must have stolen it before the Doctor defused it, with the intention of destroying the Scientifica. A sadistic Adjudicator named Dareau transmats Tegan to the Scientifica to warn them, despite the risk that the atmospheric disturbances may interfere with reception and cause her to materialize in more than one piece. Fortunately, she survives and manages to defeat Adam, and learns that the bomb wasn't active in any case. Dareau is arrested for inhumane treatment of a prisoner. Meanwhile, Roz and Adric escape and set off in search of either Doctor.
The remaining charges are delivered to Medford as the Doctor and Patience prepare to use a remote control to pilot the Machine back to their home world. The Ferutu appear before him, identifying themselves as the Lords of Time, but before they can do anything the Unitatus fleet obliterates the waystation from orbit, breaking their hold on this world. Since the Doctor had earlier identified himself as a Time Lord, Medford is now certain that the Time Lords are hostile aliens planning to conquer the Earth Empire. He loads the fusion charges onto the Machine and sets them to detonate as soon as it arrives at its destination; the Doctor doesn't tell him that they've been defused. He and Patience use the remote to dematerialize the Machine, but Medford then shoots Patience in the back of the head, destroying her brain so she can't regenerate. Patience's body vanishes into thin air, and the Seventh Doctor, Roz and Adric arrive before Medford can shoot the Fifth Doctor. The Fifth Doctor shoots Medford, and although his armour cushions the blow, it kicks him out of the room, which the Doctors then seal.
The Seventh Doctor informs the Fifth that he'd already found and defused the bombs before the Fifth did; thus, the Fifth accidentally re-armed them. The Seventh Doctor identifies the Ferutu as wielders of magic, Time Lords from an alternate history in which Gallifrey was destroyed millions of years ago; Whitfield's use of the Machine damaged the structure of space-time, allowing hints of the alternate timeline to show through. When the Machine arrives at its destination, the fusion bombs will destroy ancient Gallifrey and the Ferutu's timeline will come to pass. The Ferutu, fighting for the survival of their Universe, destroy the entire Unitatus fleet. The damaged Vortex has been repaired, and the Doctors use the remote to summon the Machine back before it arrives on ancient Gallifrey. The Ferutu attempt to stop them, but the Seventh Doctor traps them in a chalk circle and informs them that their only hope now is to use their magical powers to hold the approaching Machine in place. If it materializes now, this entire sector of the galaxy will be destroyed, but by keeping it outside space and time, both timelines can co-exist.
The Ferutu reluctantly agree to this compromise, but realize too late that the Seventh Doctor has tricked them. The Machine, frozen in its original flight path, is struck by its original self, which is just arriving in the planet's past. When the two Machines collide, the fusion charges detonate, destroying the elder Machine, damaging the Vortex and causing the younger Machine and its occupant to crash earlier in the history of the planet. The few Ferutu remaining trapped in their chalk circle now can never leave its confines; history has been fixed on the Gallifreyan course, and the Ferutu have never existed. Unitatus has been dealt a blow from which it will never recover because Medford was fighting the wrong enemy all along. As the two Doctors are reunited with their respective companions and depart, the Fifth Doctor remains appalled by his glimpse of his future self, someone capable of callously tricking the Ferutu into destroying their entire Universe.
Source: Cameron Dixon