The explosion of the mercury fluid link forces the Second Doctor and Jamie McCrimmon to evacuate the TARDIS to avoid mercury fumes, and until the mercury can be replaced, the craft is marooned. They find themselves on a space vessel, deserted apart from a Servo-Robot. The robot detects the intruders and in response redirects the rocket from aimless wandering. The shock of a course change causes the Doctor to hit his head, briefly concussing him. The robot also releases a group of egg-shaped white pods into space, and the mysterious things direct themselves toward a nearby spaceship shaped like a giant wheel, attaching themselves to its exterior by a seeming act of will. When the robot becomes aggressive, Jamie succeeds in destroying it, but the Doctor is very weak and collapses.
The Wheel is an Earth space station observing phenomena in deep space and is staffed with a small international crew. The crew members are concerned by the sudden drops in pressure which, unbeknown to them, coincide with the pods attaching themselves to the exterior of the Wheel. Controller Jarvis Bennett is also worried that the Silver Carrier, a missing supply vessel eighty million miles off course, has suddenly turned up nearby and is not responding to radio contact. He decides to destroy it with the Wheel’s powerful x-ray laser and is only prevented from doing so when they hear a deafening burst of noise from the vessel. Jamie has managed to alert them to his presence aboard the Carrier and shortly thereafter he and the unconscious Doctor are both rescued and taken aboard the Wheel. While the resident medic, Doctor Gemma Corwyn, sees to the Doctor, Jamie is given a guided tour by the sparky young para-psychology librarian, Zoe Heriot. Bennett remains suspicious of the new arrivals, fearing they could be saboteurs opposed to the space program. He decides to use the x-ray laser on the Carrier now that the two refugees have been rescued, little realizing that the TARDIS is still on board. Jamie intervenes to sabotage the laser, which only further infuriates Bennett, especially as there is a potential meteor shower heading for the Wheel – and they now have no way to repel it. When the Doctor recovers in the sickbay he does not approve of this action. He also remains groggy and unclear, but convinced that a major danger lurked on the Silver Carrier. He calculates that the ship did not drift to their sector but was deliberately piloted there. The Wheel’s crew, however, are more concerned with the impending meteor shower.
Meanwhile on board the Carrier, two large pods have split open to reveal two Cybermen inside. The small pods they sent to the Wheel contained Cybermats and these have been sent to begin consuming the bernalium rods in the Wheel’s stores. The bernalium is essential to power the x-ray laser. The Cybermen have deliberately engineered the star in Messier 13 to go nova, thus forcing the Wheel crew to look to their bernalium stores only to find them missing. When this happens the Cybermen expect the crewmen will instead come to the Silver Carrier for an alternate source of bernalium, which can then be transported into the Wheel – with a surprise inside.
Engineer Bill Duggan indeed has noted the depleted stocks and the presence of the Cybermats. His delay in reacting allows another crewman, Kemel Rudkin, to fall victim to the Cybermats. Jarvis Bennett overreacts with panic to this state of affairs, briefly stripping Duggan of his position and imposing tighter controls. The Doctor has a more practical solution – he uses the x-ray machine to scan inside a pod that has been found but cannot be opened. The Cybermat within is easily identified, but Bennett does not accept the danger. Indeed, medic Gemma Corwyn, who has formed an alliance with the Doctor, fears for Bennett’s mental state as he seems unable to deal with escalating events. Over time his behaviour seems to be becoming more and more bizarre and detached from reality.
Jarvis sends two crewmen, Laleham and Vallance, to the Silver Carrier and the two are taken over by the Cybermen and used to prepare the bernalium crates destined for the Wheel with two Cybermen hidden inside. This ruse works and the crates are soon aboard the Wheel. Duggan and his colleague Leo Ryan are glad to have access to a new power supply for the x-ray laser, which they are slowly managing to repair. An engineer called Chang is killed by the emerging Cybermen when he is sent to fetch the new bernalium supply. They dispose of his body in the waste incinerator. Laleham and Vallance arrive at the laser with the supply of bernalium for Duggan, who also soon falls victim to the same mind control process and becomes the third agent of the Cybermen on the Wheel. Duggan is sent to destroy the communications unit and manages to do so before being gunned down.
The Doctor has meanwhile deduced that the fortuitous supply of bernalium has a deeper significance. He has also reasoned that the late Duggan was being mind controlled and instructs Dr Corwyn to use a basic transistor system attached to each of the crews' necks as a means of repelling this technique. A further step forward is taken when the crew use a sonic wave to disable and kill the Cybermats on the Wheel, but it is also clear that the Cybermen are at large and proceeding with their plans. The death of Laleham is no obstacle to the Cybermen as another engineer, Flannigan, is found to replace him. The Cybermen have invested time in repairing the x-ray laser, evidently needing it ready for use. Thus when the meteorites are finally due to hit they can be deflected and obliterated. The Cybermen need the Wheel intact as they plan to use it as a launching point for an invasion of Earth, desperate for the planet’s mineral wealth. The Wheel's radio beam will enable them to do this.
The human crew have managed to fully repair the x-ray laser and use it to defend against the incoming meteorites. One by one they are picked off by the Cybermen or their agents. Gemma Corwyn dies trying to prevent a Cybermen from damaging the oxygen supply on the Wheel. Shocked back to consciousness by her death, the insane Jarvis Bennett is killed when he seeks revenge. Leo Ryan assumes control as the Doctor warns there is a vast Cyberman spacecraft heading for the Wheel.
The Doctor decides that he needs the time vector generator which he earlier removed from the TARDIS. Jamie and Zoe are chosen for a space-walk to the Silver Carrier and return with it. Flannigan tries to overpower them when they get back to the Wheel, but he in turn is overwhelmed by Leo and Enrico Casali, the communications officer, and his conditioning is broken. The Doctor also manages a triumph, electrocuting one of the Cybermen and confirming to himself the full nature of their plans. He uses the time vector generator to boost the power of the x-ray laser and is successful in destroying the advancing Cybership. A troop of Cybermen that are space-walking to the Wheel are also dispensed with, while Jamie and Flannigan free Vallance and destroy the remaining Cyberman inside the Wheel.
With the invasion repelled, the Doctor and Jamie return to the Silver Carrier with the mercury they need to repair the TARDIS. They are accompanied by Zoe, who quietly stows away as the time vessel departs. She is determined to stay and so, to warn her of the dangers ahead, the Doctor uses a mental device to project images from his mind to the viewscreen, which tell her of his and Jamie's encounter with the Daleks in their search for the Dalek Factor...