The Second Doctor, Jamie and Victoria are enjoying themselves on a beach in Australia when the Doctor is subject to an assassination attempt. The controller of the would-be assassins, an agent named Astrid Ferrier, rescues them by helicopter. She takes them to her boss Giles Kent. It seems the Doctor is the physical double of Salamander, a ruthless megalomaniac who is dominating the United Zones Organisation in the early part of the twenty first century. Salamander has ascended to power via exploiting new technology to yield more food, concentrating and harnessing the sun’s rays to generate more crops, but is set on increasing his power. When Kent, who was once Deputy Security Leader for North Africa and Europe, crossed Salamander, the dictator ruined him and removed his various allies. The only remaining Kent ally with any authority is Alexander Denes in Central Europe. The Doctor is persuaded to impersonate Salamander as a way of gathering more information on his designs. His first test comes when Kent’s home is surrounded by security troops and their leader, Security Chief Donald Bruce, arrives. Bruce is a bully who intimidates those in his path, but the Doctor’s impersonation is strong enough to persuade him that he is Salamander – even though the real Salamander is supposed to be at a conference in the Central European Zone. Bruce leaves, albeit with suspicion, while the Doctor turns on Kent, realising he called Bruce there himself to test the impersonation. The Doctor is not yet convinced Salamander is a villain, but Kent presses ahead with a plan. Jamie, Victoria, and Astrid are to infiltrate Salamander's retinue while he's still in the Central European zone, via Denes’ support, and gather evidence on Salamander. Meanwhile, Kent and the Doctor will travel to Salamander's research station in Kanowa to gather intelligence there.
The real Salamander, in the Central European Zone, warns that a dormant volcano range in Hungary is about to explode. Denes does not believe this is possible and resist the calls to send pre-emptive relief. Jamie, Victoria, and Astrid have by now reached the Central European Zone. Jamie is to try and infiltrate Leader Salamander's retinue, while Astrid contacts Denes for a meeting. Jamie manages to get himself promoted to Salamander’s personal staff by preventing a bogus attempt on the Leader’s life, and also ensures Victoria is given a position as assistant to Salamander's personal chef. When Astrid meets Denes she tells him of the two spies who have entered the Leader’s staff.
Salamander now works on Denes’ deputy, Fedorin, to turn him against Denes. Fedorin is a weak man and gives in to Salamander’s blackmail easily, but is scared when he hears the prediction that Denes will soon be killed and Salamander will be asked to take over the Zone following the imminent natural disaster. On cue an earthquake begins as the promised volcanic eruption starts. Donald Bruce arrives but is unable to mention the Salamander in Australia issue before Denes returns to the palace too, blaming Salamander for somehow engineering the volcano. Salamander responds by saying Denes failed to heed his warnings on the volcanoes and is thus negligent and must be removed from office. Denes is arrested and Salamander now tells Fedorin to poison him before he can be brought to trial and repeat his allegations. When Fedorin fails to do so, Salamander uses the poison on him instead.
Donald Bruce has meanwhile started to have serious suspicions about the situation. He evidently does not trust Salamander, and tries unsuccessfully to get Jamie to explain the Australia incident. Another man with suspicions is Theodore Benik, Salamander’s unpleasant deputy, who has heard from Bruce that Salamander was supposed to be in two places at one time. He visits and intimidates Giles Kent, but the Doctor stays hidden while the unsolicited visitor is there destroying Kent’s property.
Jamie and Victoria meanwhile use their new roles in the palace to get close to Fariah, Salamander’s food taster, hoping to gather information on the Leader’s intentions. Jamie also causes a diversion to try and facilitate a rescue attempt on Denes by Astrid. However, things fall apart and Denes is shot dead. Though Astrid escapes, Jamie and Victoria are arrested. This prompts Bruce to ask Salamander in private about his relationship with Jamie and his presence with him and Kent in Australia – which prompts Salamander to decide to return to Kanowa immediately and unmask the impersonator.
Astrid returns to Australia too and contacts the Doctor and Kent to tell them of the outcome of the botched rescue attempt. Fariah has followed Astrid and makes contact with her, Kent and the Doctor, telling them that Jamie and Victoria have been brought as prisoners to the Kanowa Research Centre. Fariah also hands over the file made by Salamander to blackmail Fedorin - which finally convinces the Doctor of Salamander’s evil. However, before they can act the building is raided by Benik and his troops and Fariah is killed and the file recovered. The others escape.
Salamander, Benik and Bruce meet at the Centre and realise the severity of the situation. When he is alone, Salamander dons a radiation suit and enters a secret lift, which transports him to a secret bunker below the Centre. In the bunker are scientists who believe Salamander has just ventured to the surface of the allegedly irradiated planet to look for food. He claims to have found a safe new food stock to sustain them after their five years below ground. He also urges them to continue fighting the war against the surface by using technology to create natural disasters. Most of the scientists accept this but one, Colin, urges Salamander to take him to the surface the next time, even though no one who has accompanied Salamander there has ever returned.
When the Doctor and his friends return to Kent’s caravan they are soon discovered by Donald Bruce, who has traced their car. Bruce affirms he is a servant of the world government, not Salamander, and shows he can be persuaded by the case that the Leader is, in Astrid’s words, a traitor, blackmailer and murderer. The Doctor and Bruce reach a deal: they will travel to the Research Centre where the Doctor will impersonate Salamander to gain more evidence, while Kent and Astrid are kept under guard; but if no evidence is found they will all be arrested for conspiracy. Bruce and the Doctor leave, and shortly afterward Kent and Astrid escape their captor by means of a ruse.
In the shelter the promised new food has arrived and the scientists unpack it. However, one of them, Swann, finds a stray newspaper clipping and realises there is normal life on the surface rather than the continuing nuclear war they had all been told. He confronts Salamander, who agrees to take him to the surface to show him the world is now full of hideous, depraved mutants and their actions in causing natural disasters are helping to wipe them out. Swann is unmoved but agrees to go the surface without revealing his concerns. This incenses Colin, another scientist who had been told he might get to the surface soon.
Above ground Benik has begun interrogating Jamie and Victoria. He gets menacing and is only stopped when Bruce and the fake Salamander arrive, sending Benik away. While the travellers are reunited, deepening Bruce’s trust of the Doctor, Benik discovers from a guard that Salamander does not seem to have returned from the records room. The Doctor now obtains evidence that the food supplies for the Research Centre vastly exceed the expected amount of supplies needed. He heads off alone and accesses the Records Room, where he impersonates Salamander. A visitor soon arrives – Giles Kent – who has a key to the secret room and knows much more of Salamander’s plans than he ever let on.
In the grounds of the research centre Astrid finds Swann. He has been bludgeoned by Salamander and is close to death but manages to tell her of the bunker below before he passes away. She now uses the secret lift to access the bunker and with some difficulty explains the truth to the scientists. Colin is the first to believe her and he and Mary join Astrid in the small lift for its journey to the surface. When they reach the Records Room, they encounter the Doctor and Kent – and the latter is denounced as the person who took them all below ground in the first place. It seems that Kent and Salamander were allies all along, and the Doctor reveals he had been slow to support Kent because he feared all along he was being used just to topple Salamander for Kent to take over. Kent manages to flee into the cave system beyond the Records Room.
Donald Bruce has meanwhile asserted his authority and taken over the Research Centre, arresting Benik in the process. The Doctor contacts Bruce and tells him of the situation, after which the Doctor himself heads into the tunnels to seek out Kent and Salamander. The two felons have met, with Salamander fatally wounding his one-time ally, who seeks revenge by blowing up the cave system. Astrid co-ordinates the relief effort to get the other scientists out of the shelter
The Doctor, who has emerged unscathed from the tunnels, arrives on the beach with the TARDIS. Jamie and Victoria are waiting for him there and he pleads exhaustion when they enter the ship, asking Jamie to pilot it for him instead. Jamie’s suspicions are proved true when the real Doctor arrives and denounces Salamander’s impersonation of him. The dictator responds by activating the dematerialisation control and the TARDIS heads away from Earth with its doors still open. Salamander is blown out into the vortex, while the others cling on to the TARDIS console for dear life...