Instead of returning Anji to Soho, 2001, the TARDIS has materialised on a rocky, barren plain. Fitz seems sure that the Doctor will work out where they are, but Anji is less confident -- as is the Doctor. As they explore, they are attacked by a caveman and, less explicably, a pterodactyl, and while fleeing they run into an invisible barrier. The Doctor tries to open the barrier with his sonic screwdriver, but he can’t consciously remember how it works; he has to be distracted first, and then the movements come to him instinctively. The barrier opens, and Fitz leaps through, but before the Doctor or Anji can follow him it closes up again and a security robot arrives to arrest them both. The robot marches them across the plain to another barrier, and when they pass through they find themselves on the outskirts of a futuristic city, surrounded by angry guards who accuse them of sabotage and terrorism. They confiscate Anji’s name-badge, one of the last gifts Dave gave her before his death, and throw them into a cell without giving them a chance to explain themselves. They find themselves locked up with three teenagers, would-be terrorists who have taken the alien names of Beezee, Zequathon and Xernic to disassociate themselves from the distant and hated Earth. Unfortunately for Anji, their organisation is called the Association for New Jupitan Independence -- or ANJI, for short. And this is the condemned cell for those who face execution.
Fitz finds himself in a bizarre version of Ancient Egypt, complete with walking mummies and a man with a jackal’s head. A young blonde girl, no more than thirteen, finds him wandering about and helps him to “return” to his proper area, the Twentieth Century London Zone. He tells her that he’s a famous pop star named Fitz Fortune, but although she seems impressed she has to flee back to Egypt when she spots the curator approaching. The curator, Venna Durwell, believes at first that Fitz is a malfunctioning android, and to save himself from disassembly Fitz starts to point out all of the errors in the zone around him; flappers, rocketships, and gas lamps didn’t co-exist in the same era, and the “War Machines” which supposedly used to deliver mail from the Post Office Tower are just plain bizarre. Durwell realises that Fitz is for real, and takes him to her office, intending to learn everything he knows about the real twentieth century -- and then kill him and use his knowledge to make a real name for herself so she won’t have to rely on Earth Heritage’s measly research grants for her living. While she is off dealing with an emergency in the park, however, Fitz is kidnapped by a security robot and brought before the three daughters of New Jupiter’s President, John F Hoover. Asia, Africa, and Antarctica have taken a shine to him since Antarctica rescued him from Egypt, and they demand that he give a concert for them. If he refuses, Africa will have him killed. Fitz realises that they’re not joking when they take him to the Roman zone, to watch as a visitor they kidnapped from EarthWorld is torn apart in the arena by an android lion.
The young terrorists eventually realise that the Doctor and Anji aren’t government spies, and explain more about their organisation. President Hoover believes that all good things come from the birthplace of the human race, but the ANJI boys want a planetary identity of their own and don’t see why they should have to pay taxes to a distant, otherwise insignificant world. New Jupiter is suffering from a recession, and much of President Hoover’s popularity depends upon the founding of EarthWorld, an Earth Heritage theme park which it is hoped will boost tourism. The ANJI boys want to sabotage EarthWorld, and they have been helped by an anonymous supporter in the government who supplied them with the devices they need to penetrate the force barriers and deactivate the androids. But people have been dying mysteriously in EarthWorld, and when the ANJI boys were caught in the grounds they were thrown in here without a chance to explain themselves. The Doctor, recalling the attack when he first arrived, theorises that the androids in the park may be malfunctioning. Since many of the androids were designed by the triplet princesses, the Doctor decides to speak with them, while Anji and the boys return to the park to rescue Fitz.
First, they must break out. Fortunately, the guards didn’t bother to search them, and Anji distracts the Doctor while he uses the sonic screwdriver to open the cell door. While she and the boys return to the park, the Doctor finds his way to the President’s palace, and the wing where the three princesses are kept isolated from the public. He soon finds out why -- despite their genius-level intellects, they’re homicidally antisocial, and the deaths in the park were no accidents. The princesses were locked away for the murder of their own mother, but they have inherited her talent for genetic manipulation and have learned much about androids from the President’s chief technician, Hanstrum -- their only other contact in isolation. Thus, when EarthWorld was first mooted as a concept, the princesses were allowed to design the park’s androids -- and they took advantage of the opportunity to build copies of themselves, switch places with them, and sneak into the park unnoticed. Ever since, the real princesses have been having murderous fun with the early visitors and competition winners who have been allowed into EarthWorld before its grand opening. The Doctor, disturbed, questions the androids further and learns that, although they possess the real princesses’ memories, they don’t recall killing their mother. However, they assume that they did so because she was going to tell their father that they were unfit to rule.
Anji and the boys return to the Prehistoric Zone, where one of the princesses finds them and sets the android dinosaurs on them. The Doctor sees this on the monitors in the android princesses’ control room, and before they can stop him, he sabotages the control unit, shutting down all of the barriers between the different EarthWorld zones. The android princesses try to kill him, but he flees, only to be recaptured by the guards. This time he is brought before the President and Hanstrum to explain himself before he is sentenced to death. Hanstrum seems even more shocked than President Hoover when the Doctor claims that the girls in the palace are not the President’s daughters, and when the Doctor reveals that they are androids, Hanstrum examines them and realises that the Doctor is telling the truth. Now that the barriers are down in EarthWorld, the killer androids can cross freely between zones, and all of the visitors to EarthWorld -- and the real princesses -- are in danger. Hoover reluctantly allows the Doctor to accompany Hanstrum back to EarthWorld, where Durwell is trying and failing to control the situation. The Doctor leaves her and Hanstrum to evacuate the park and find the homicidal triplets, while he tries to find and rescue his friends.
Following the slaughter in the Roman arena, Antarctica decides that she wants Fitz Fortune to give her a concert. He’s reluctant to do so, knowing that he inflated his description of his talents, but he knows that he has no choice -- and much to his own surprise, he knocks them all dead on stage with a stunning show. The triplets show him to a dressing room and leave him with a Walkman-like device so he can listen to his own performance, but as he does so the truth sinks in. He’s a virtuoso guitar player because that’s how the TARDIS remembered him; he seems better than he’s ever been, because the real Fitz was never this good. The real Fitz Kreiner was abandoned by the Doctor, spent two thousand miserable years with Faction Paradox, fell into the Vortex on Dust and died on Gallifrey. This Fitz may be indistinguishable from the real thing, but he’s just a copy. And he doesn’t know how he should feel about that.
When the barriers go down in EarthWorld, Anji and the boys flee into the Egyptian Zone, where Anji gets them past a guardian sphinx and into a pyramid, away from the pursuing dinosaurs. They must solve another logical puzzle to proceed further, and then venture through a maze, in the middle of which they find a sarcophagus which opens to reveal the Doctor. The sarcophagus is actually a lift which takes them back out of the pyramid. The Doctor leads them to the Twentieth Century Zone, where they Fitz huddled in a dressing room, repeating over and over that he’s not the real Fitz. However, the Doctor has more immediate concerns; although the complex has now been evacuated, the failure of the internal barriers is putting a strain on the external barrier. Even if it doesn’t explode and destroy the city, it will fail and release the killer androids into the streets. The Doctor wires Xernic’s anti-android device into the barrier system, hoping to channel the power surge through it when the barrier collapses, and send out a pulse which will deactivate all of the androids within range. As the Doctor works, however, Durwell gets Fitz back to her office and pulls a gun on him, demanding the knowledge she needs to break Earth Heritage’s hold over her. The Doctor realises what’s happening too late, and breaks into her office just as she shoots Fitz... and just as the anti-android energy wave passes through the park. “Fitz” explodes, killing Durwell; he was an android all along, planted by the triplets to throw Fitz’s friends off the scent. The real Fitz, or the nearest equivalent, is still their prisoner -- and their own security robots are shielded from the energy wave, so he’s no closer to escaping.
Fitz is in a cell with an elderly Elvis impersonator, who was invited to EarthWorld to sing his repertoire into an android copy. The people of this era seem to be under the impression that Elvis was once the King of Earth. Unfortunately, Antarctica took a shine to the impersonator and kidnapped him so he could give her private concerts whenever she wanted. Since all of the androids in EarthWorld have now been deactivated, the triplets decide to pit Fitz and Elvis against each other in a fight to the death, to see who will survive to give them a concert. Fitz doesn’t want to kill Elvis, but Elvis will do anything it takes to survive -- but just as it seems he’s about to get the upper hand and kill Fitz, Africa shoots him dead, saving Fitz’s life. She was bored with Elvis anyway, and Fitz has something else she wants. The Walkman-like device which Fitz used earlier copied his memories, enabling the triplets to build their android copy -- and since Fitz was having an identity crisis at the time, the android became obsessed with the fact that it wasn’t the real Fitz. But the triplets have found something even more interesting in Fitz’s memories -- he has access to a time machine, and can take them away from boring old New Jupiter and off to the real, exciting Earth.
While Hanstrum searches for the princesses in EarthWorld, the Doctor intercepts an emergency call from the palace; the President’s wife, who has lain in a coma ever since the attack by her daughters, has flat-lined. The Doctor attends the late Elizabethan himself, and discovers that she is partly cybernetic; this is why she appeared to die when the anti-android pulse was sent out from EarthWorld. Hoover breaks down, blaming himself for avoiding his daughters; his wife was from a noble, Earthborn family, but although he loved her he would have had to divorce her if she hadn’t produced heirs. Although she eventually did bear the triplets, their antisocial tendencies soon became apparent, and Hoover had them isolated in the palace -- ostensibly to prevent dissidents from kidnapping them, but really to prevent the public from learning the truth. Incarceration and exposure to the myths about Earth only exacerbated their psychotic tendencies, however, and when they were found screaming and covered in blood next to their mother’s body, Hoover could no longer deny the rumours he’d heard and had to lock them up for their own good. But someone has used cybernetic implants to keep Elizabethan in a coma, and the Doctor suspects that some other agenda is at work. If Elizabethan dies, the President will be free to marry again -- but as long as she remains technically alive, the triplets will be the only legitimate heirs. Since they are clearly unsuited to rule, this will clear the way for someone else to take the throne...
Beezee and Zequathon have had enough of the terrorism game, and when Hanstrum promises them amnesty, they leave to help evacuate the remaining visitors. Xernic, who has developed a crush on Anji, remains to help her find Fitz; so does Hanstrum, who wants to locate the princesses. He reveals that he is the one who supplied the ANJI boys with their weapons, knowing that they weren’t dangerous enough to start a full-scale revolution, but hoping to make the political climate so uncomfortable that President Hoover would resign and appoint Hanstrum to rule in his place. Meanwhile, Fitz is in the Medieval Zone, where the triplets are using a Memory Machine to make an in-depth scan of his mind and learn the truth about the TARDIS. They’re surprised by the state of his memory; possibly because of the way the TARDIS put him back together, his oldest memories are now permanent, and they appear to be crowding out some of the newer ones. The triplets offer to use his memories to create a replica of Filippa, his lover from Mechta, on condition that he convinces the Doctor to take them to Earth. However, he knows that it wouldn’t be the real Filippa, and he rejects their offer.
Hanstrum, Anji and Xernic track down Fitz and the triplets, and Hanstrum tries to manipulate the girls into agreeing to kill Hoover and letting Hanstrum rule as regent until they come of age. However, they refuse, as they don’t like New Jupiter, and want to go to Earth instead. Using cannibalised parts from their bodyguard robots, they repair the android knights in the Medieval Zone’s castle, and have the protesting Hanstrum taken to the dungeons. Anji and Fitz manage to escape, but Xernic falls behind and is recaptured. Fortunately, the Doctor and Hoover arrive in time to rescue Anji and Fitz from the pursuing knights. Somehow they must rescue Xernic and bring Hanstrum and the princesses to book; the Doctor thus suggests turning the princesses’ game against them by infiltrating their fantasy. The legends of King Arthur are about as accurate as the rest of the history in EarthWorld, but Anji nevertheless agrees to impersonate “Queen Gwinnyveer”, despite the nagging feeling that she’s being disrespectful to Dave’s memory. She uses the sonic screwdriver to disorientate the android “Sir Lancelet”, and convinces him that the triplets are the King’s three evil sisters, Morgan, Leigh and Fay. Sir Lancelet thus has them cast into the dungeons, and releases the brave Squire Xernic.
Hoover finally speaks to the triplets whom he had shamefully abandoned, but they don’t trust him until he agrees to let them scan his memories. When they do so, they see that the Doctor has truly convinced him that they didn’t kill their mother after all. As they explain how the deep memory scan works, Anji realises that the machine might be able to restore the Doctor’s buried memories -- and Fitz is unable to explain in front of the Doctor why this might be a very bad thing. When Fitz refuses to help, Anji volunteers to let the triplets use her brain for storage space, and she and the Doctor take their places in the machine before Fitz can think of a reason to stop them. However, once connected to the memory machine, the Doctor and Anji find that there are other memory prints stored there; Africa’s, for one, which shows that the triplets think of themselves as three parts of the same person. And buried deep beneath the other prints, the Doctor and Anji find the memories of Hanstrum and Elizabethan, which the triplets took while first experimenting with the machine. These prints were deleted but not entirely destroyed, and when Asia learns that they’re still there, she realises that they can restore what remains of their mother’s mind to her body. Before anyone can stop him, Hanstrum grabs a guard’s gun and shoots the machine to prevent them from doing so. The explosion kills Asia, and the infuriated Antarctica grabs a gun and shoots Hanstrum. The Doctor and Anji, who were still connected to the machine when it exploded, then relive the last moments of Elizabethan’s life for all to see. As she was a geneticist, she knew that it was her husband who was unable to bear children, and she thus used genetic samples from Hanstrum to conduct an in vitro fertilisation on herself. But she made a mistake in the process and split her one child into three, each incomplete and suffering from personality problems which made them unsuitable to rule. Hanstrum regarded the children as his own, and when Elizabethan told him she intended to confess all to the President, Hanstrum killed her.
As the Doctor and Anji emerge from their fugue, the Doctor realises that he retains enough of Elizabethan’s memories to restore her to life as the triplets had wished. He takes the Memory Machine to the TARDIS, intending to use it as a replacement to fill in the gaps in Elizabethan’s memory; however, Fitz still fears what might happen if the Doctor’s own memories return in one shocking burst, and he privately asks the TARDIS to ensure that this doesn’t happen. Thus, the Doctor successfully transfers Elizabethan’s memories back into her body, but a power surge from the TARDIS destroys the Memory Machine before he can untangle his own copied memories. The power surge also sparks Elizabethan’s cybernetic body back to life. Without Asia, the rational part of their gestalt, Africa and Antarctica will never be complete again; but now that they have their mother back, perhaps they will get the care they need. As Hoover takes his wife and daughters back to the palace, Anji bids goodbye to Xernic and returns to the TARDIS with the Doctor and Fitz. Fitz still hasn’t resolved his identity crisis fully, but he knows that it’s more important for him to protect the Doctor from his own. Meanwhile, Anji returns to the TARDIS guest room -- her room -- to find that she’s run out of distractions and can no longer stop herself thinking about Dave’s death. But as she starts to break down, the Doctor finds her and takes her to a room he’s just found in the TARDIS. It opens up onto a grassy hillside in which thousands of butterfly chrysalides are waiting to open. There’s new life in the TARDIS, and here, Anji can grieve properly for her loss.