The TARDIS materializes atop a skyscraper in a futuristic city, where the Doctor becomes intrigued by a gigantic construction which resembles a rocketship; how can it possibly launch without the blast destroying the entire city? The building turns out to be completely hollow, and when they descend to the lower levels they find the motorists in the passing cars don't react to their presence at all. Before they can learn anything more a meteorite shower strikes the city, bringing down part of the enclosed roadway, and as Barbara and Susan rush back to the TARDIS, Ian and the Doctor pause to help a trapped driver -- only to find that the car was a dummy, driven by an animatronic robot. At that moment, the tower is struck by a meteorite and collapses, apparently with Barbara and Susan inside. Rescue services arrive and dig out the badly injured Susan, and the desperate Doctor and Ian are sent to the internment camps, their claims about their arrival dismissed as madness. In the camp, they learn that they are on the planet Sarah, that the orbit of its moon is decaying following a collision with an asteroid -- and that although a Ship has been built to evacuate the population of Arkhaven to the neighbouring world Mirath before the end of the world, there is not enough room for everyone on board. Non-conforming non-citizens, NC2s, have thus been confined to the camps, and when the Ship launches, they will be abandoned to their fate.
The Doctor and Ian learn that a man named Gelvert intends to escape, and when he attempts to rob them of their belongings, the Doctor loses the TARDIS key to him. The Doctor reports Gelvert's intentions to the authorities, but finds that camp security is remarkably lax; this is not the first escape from the camp, and when the Doctor eavesdrops on a conversation between warden Breen and security trooper Ben Lant, he realizes that an extraordinary number of escapees have never been recaptured. The Doctor easily deduces from the available evidence how the escape was engineered, and Lant, impressed by his keen intelligence, agrees to keep an eye on Susan and on the repair of the collapsed tower. Lant thus visits the city hospital, where chief medical officer Nyra Shardri has put the apparently dying Susan in Emergency Stasis, unaware that Susan was just entering a healing coma. Shardri shows Lant odd readings from the medical computers which seem to indicate that Susan is not of this world, and Lant, intrigued, goes to the ruins of Carlson Tower to investigate further. The TARDIS has just been unearthed from the rubble, and when it proves impervious to all attempts to break in, Lant takes his story directly to Mayor Draad.
Gelvert and his fellow escapees hide in an empty warehouse, intending to smuggle themselves aboard the Ship with its cargo. Their escape attempt, however, turns out to have been arranged by bored youth from Arkhaven's Elite caste, in order to give themselves quarry to hunt. Gelvert and two other escapees manage to evade the hunting youths, who hunt down and capture the other fugitives and turn them over to the City Watch once they've had their fun. As Gelvert and his companions try to reach the warehouses, they come to realize that Arkhaven is almost entirely deserted; the "people" in the streets are almost all animatronic dummies, and many of the buildings are plasterboard recreations. Spooked and uncertain, they hide out in an empty building for the night, but something like a giant snake pursues them and captures Gelvert's fellow escapees. Fleeing in terror, Gelvert loses the coat in which he was keeping the key he stole from the Doctor, and then falls to his death from the building.
The Doctor and Ian are summoned for an audience with Mayor Draad, and the Doctor, after explaining how they came to be here, agrees to offer advice on the construction of the Ship. First, however, he requires an explanation for the fact that the city is nearly deserted. Draad explains that when construction of the Ship began, Arkhaven was attacked by the Taklarians, natives of a country which practiced selective breeding for a thousand years and who therefore believed themselves inherently superior and more deserving of survival. At first the use of automata and false-front buildings was intended to deceive the Taklarians into believing that their attacks were less successful than they truly were; in fact, by the time the Taklarians were defeated, ninety percent of Arkhaven's population had been wiped out. The Taklarian battleship was left smouldering on the beach while all resources were diverted to the continuing construction of the Ship, and the deception was continued in order to boost morale amongst the survivors. The Doctor, apparently satisfied, agrees to help advise on the final stages of construction -- but remains silent about his own suspicions, raised by an obvious inconsistency in the Mayor's story.
Barbara awakens to find that the tower's lift cage has protected her from the falling rubble, and she manages to escape before the settling rubble finally crushes the cage. She falls through a crack in the floor into the drainage tunnels beneath the city, but since regular maintenance is no longer required due to the evacuation, the tunnels have been sealed and she is unable to find a way out. She follows boot marks to what appears to be a maintenance hatch, only to be captured by Prince Keldo of the Taklarian Empire. In their rush to get back to work on the Ship, the Arkhavens neglected to determine whether all of the Taklarians were killed, and over the past year, the few survivors have burrowed a tunnel from the ruins of their ship out underneath the city. They now intend to capture the Ship by using brainwashed Arkhavians as their unwitting allies, and -- assuming Barbara to be an Arkhavian driven mad by fear -- they test their conditioning units on her. A signal device is implanted in her wristwatch, and she is released back into the drainage system with no memory of what has happened to her.
Draad releases news of the aliens' arrival and convinces the Doctor and Ian to attend a public social event to help boost morale. While dining, however, Draad is interrupted by the son of Lord Vendam, head of the Elite, and by an emissary from Bishop Fostel; both are angry that the arrival of the aliens was not reported to them immediately. The Doctor and Ian thus learn that the people of Arkhaven are divided by class, and that the construction of the Ship has led to greater power and appreciation for the Functionary class while the Elite and Church classes see their traditional prestige diminishing. Much tension has developed as a result, and even Professor Jarrasen, designer of the Ship, can't help but gloat that the other classes have been forced to turn to him for survival after denying him funding for so many years. The Doctor requests and is given a tour of the Ship, which confirms his earlier suspicions; nevertheless, although he shares them with Ian, he chooses not to reveal his knowledge to the others until he knows what is really happening. Susan, meanwhile, continues to recover in hospital, although she experiences a strange dream about being in a wet and unpleasant place like a recycling plant.
Lant, puzzled by something Plaxander Vendam said while confronting Draad, goes to his home to confront him about the hunt, and when he puts together Plaxander's claims with the count from last night's escape he realizes that at least eight of the escapees are unaccounted for. However, when he reports to his superior, Commander Pardek, he is told to drop the investigation. Lord Vendam chastises his son for his errant behaviour, and the angry Plaxander is thus easily goaded by his friends to go out into the city that night to set a trap for Lant -- but instead, Plaxander is attacked by the snake-thing which took Gelvert's companions. Meanwhile, Bishop Fostel, angered by Draad's dismissive attitude towards his claim on the aliens, realizes that he must take decisive action to restore the Church's traditional power, and has Susan kidnapped so he can question her on her religious beliefs. Dissatisfied by her responses, he and his overzealous acolyte Zeckler decide to put her to trial by water. The Doctor and Ian, with the help of Lant and Shardri -- and the artificial intelligence Monitor, which oversees the day-to-day operation of Arkhaven -- use surveillance monitors and reasoned deduction to trace Susan to a disused health club owned by a true Believer. Lant leads a team to the club to rescue Susan, but they aren't expecting Fostel to be there in person, or his guards to be armed. In the ensuing gunfight, Fostel is killed and Susan is injured -- but when she is returned to the hospital, she is found to be an android copy of the real Susan. The android, however, genuinely believed itself to be the real Susan, and has no idea when the switch was made -- or why, or by whom...
The ruins of Carlson Tower are finally cleared away, and Ian enters the drains to search for Barbara -- but just as he finds her, the crumbling tunnels collapse and they are separated once again. Barbara eventually finds a way out of the tunnels, and is reunited with Susan -- the real Susan -- who has just escaped from the recycling plant in which she found herself when she awoke from her healing coma. She assumes that she was declared dead and her body disposed of. Before she and Barbara can set off in search of the others, however, they too are attacked by the snake-like Creeper, and although Ian and Lant catch a glimpse of it in the shadows while searching the area for Barbara, the Creeper impossibly seems to vanish into thin air as they pursue it. The Creeper is in fact a crowd-control security vehicle, which transports Barbara, Susan and Plaxander Vendam to a construction area some distance away from the city. There, they are put to work clearing away meteorite damage, and their guards refuse to communicate with the prisoners on any human level; they are here as slave labour, nothing more.
Zecker declares himself the new Bishop, and orders all true Believers to seek out Ben Lant and the aliens and to turn them over to Church authorities for the murder of Bishop Fostel. Draad realizes that Zeckler's announcement could tear the city apart -- but at that moment Monitor reports that the moon has succumbed to tidal stress and cracked in two. The smaller fragment will collide with the planet within eight hours; this is Zero Day, and Operation Exodus must begin immediately. As the population of Arkhaven evacuates to the Ship, Zeckler and his acolytes stand guard outside, waiting for Lant and the newcomers. The Doctor, however, refuses to leave without Susan, and he is accompanied on the search by Ian, Lant, Shardri, and the android Susan. Meanwhile, as news of the Exodus reaches the internment camp, the panicked NC2s turn on their guards and escape, heading for the Ship; Lord Vendam, who was searching the city for his missing son, is nearly beaten to death when he stumbles across a party of them. Word of the exodus also reaches the slave camp, where Barbara succumbs to the Taklarian conditioning and signals them via her wristwatch implant. As the slaves are herded into their sleeping quarters by the impassive guards, Susan sabotages the doors so they can escape once the guards have departed.
The Taklarians, acting on Barbara's signal, emerge from hiding and attack the Ship. Most of the passengers have already entered and have been sedated for the long journey, and as the Arkhavians had believed their enemies to be dead, the Taklarians easily conquer the Ship, killing Zeckler and the guards outside. Upon reaching the bridge, however, they find it deserted -- and, from his secret hiding place, Mayor Draad blows up the Ship, killing everyone aboard. The Doctor and his companions witness the explosion, but in the stunned silence which follows the Doctor announces that they have one slim chance of survival. He has Lant lead them to the area where the Creeper vanished, and there, they discover a secret entrance to a tunnel leading away from the Ship's launch pad. Accompanied by the dazed Lord Vendam and surviving NC2s from the internment camp, the Doctor and his friends follow the tunnel to its destination -- the slave camp, where Susan, Barbara and Plaxander have led their fellow slaves to safety through the sabotaged doors after an attempt was made to gas them. Using the Creeper, the Doctor and his companions burst through the sealed doors on the other side of the slave camp, where they find Draad, Jarrassen and a group of puzzled evacuees about to board a second Lander -- smaller and more compact than the Ship, and, unlike the Ship, actually capable of flight.
The Doctor had guessed the truth when Draad claimed that construction of the Ship had begun before the war with the Taklarians; if the Taklarians had wiped out ninety percent of the population, why was there supposedly so little room left on the Ship? Jarrassen admits that, as the Doctor realized when he toured the Ship, it was incapable of flight; but because his initial research had been poorly funded until crisis struck, the construction of the Ship had begun before he realized the truth. Faced with this shattering revelation, Draad and the rest of the Functionary class engaged in the great deception, constructing a second, smaller Lander capable of transporting only selected members of the Functionary class to safety, while continuing work on the Ship in order to lull the rest of the city's population into a false sense of security. Since they were unable to install meteorite defenses in the construction zone for fear of attracting unwanted attention, slave labour was diverted from the NC2 internment camp to clear away the damage, and the Creeper was sent out to capture escapees who managed to evade the City Watch. The rest of the City's population was sedated to avoid panic and killed in the Ship, as merciful a release as Draad could grant them given that there was no way to evacuate them all.
Draad insists that nothing has changed and urges his people to begin boarding, but suddenly several of the evacuees, including Ben Lant, are revealed to be androids under the control of Monitor. Having concluded that the new civilisation on Mirath would not be able to support the technology necessary for its continued survival, Monitor had begun laying plans some time ago. Anyone placed in Emergency Stasis in hospital is technically dead, and thus Monitor was able to dispose of them without contravening its programming; it then replaced them with android duplicates which were until now unaware of their true nature. Following the destruction of the Ship, the population of Arkhaven has dropped below the minimum legal definition of a city, and Monitor is thus no longer bound to obey Mayor Draad. The androids begin loading supplies aboard the Lander with which Monitor can create a fully automated society, including the TARDIS, which Monitor intends to study later; when the Lander's crew attempts to intervene, the androids kill them and Professor Jarrassen. However, Monitor's plan has failed to take Susan's survival into account; since she and her android have similar mental patterns, a telepathic link has formed between them, and the android Susan is thus able to resist Monitor's control. Her resistance causes interference in Monitor's control over the other androids, and the Lant android regains enough of his humanity to destroy Monitor's control terminal.
In a final act of spite, Monitor wipes the androids' memories and fuses the Lander's controls, and Draad dies of a heart attack when he realizes all his plans have come to nothing. But just as all appears lost, the android Susan -- having survived due to her mental link with her original self -- offers to link herself directly to the the Lander's controls and pilot the survivors to safety, although aware that the civilisation on Mirath will be unable to maintain her existence. Since Barbara has Susan's TARDIS key, which she found in the rubble of Carlson Towers as she crawled to safety, the Doctor and his companions can remain behind to ensure that the launch goes according to plan. The Doctor removes an extra-dimensional life-pod from the TARDIS in order to provide the Launcher with extra volume at no additional mass, thus ensuring that everybody can safely evacuate. Plaxander, his arrogance tamed by his experience in the slave camp, finds himself looking forward to the challenge of a new world, while Shardri vows to remember Lant for his humanity. As soon as the survivors have evacuated onto the Launcher, the Doctor and Susan operate the launch controls, and as the android pilots the Launcher safely away from the doomed world, the Doctor and his companions retreat to the TARDIS and dematerialize as the final destruction of Sarath begins.
Source: Cameron Dixon